sg: add a check for go version and docker-compose
Created by: jhchabran
This checks in pure bash that go version matches the one in .tools-version
so we can spot obvious issues early on when diagnosing issues.
$ sg doctor
# (...)
❌ Check "go-version" failed: 'bash -c go_version="1.16"
tools_version=$(cat .tool-versions | grep golang | sed 's/golang //')
[ "$go_versi...
Incorrect go version
Check produced the following output:
--------------------------------------------------------------------------------
➡️ Need go version 1.17.1, but got 1.16 instead
# (...)
❌ Check "go" failed: 'bash -c go versiowfpn || (echo "➡️ Install Go or make it sure it is in the \$PATH" && exit 1)' failed: go versiowfp...
Failed to run go
Check produced the following output:
--------------------------------------------------------------------------------
go versiowfpn: unknown command
Run 'go help' for usage.
➡️ Install Go or make it sure it is in the $PATH