Skip to content

Commit dc59b5d

Browse files
authored
Adjust go111modules detection and fix lint (#180)
* Autodetect go version and use this to adjust GO111MODULES behaviour Go 1.17+ has a changed default behaviour for GO111MODULES so autodetect if we are running go1.17+ and change the behaviour GO111MODULES to match this. Signed-off-by: Andrew Thornton <[email protected]> * And remove GO_VERSION as it is now auto-calculated The old GO_VERSION environment/configuration variable is poorly explained and appears to have conflicting uses. Switch to the auto-calculated version. Signed-off-by: Andrew Thornton <[email protected]> * Finally fix lint There were multiple issues that shellcheck found. This commit fixes these. Signed-off-by: Andrew Thornton <[email protected]> Signed-off-by: Andrew Thornton <[email protected]>
1 parent 2f372fd commit dc59b5d

File tree

2 files changed

+137
-122
lines changed

2 files changed

+137
-122
lines changed

docker/base/bootstrap_pure.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ set -e
1717

1818
# Download, verify and install the root distribution if pulled remotely
1919
if [ "$GOROOT" == "" ]; then
20-
$FETCH $ROOT_DIST $ROOT_DIST_SHA
20+
$FETCH "$ROOT_DIST" "$ROOT_DIST_SHA"
2121

22-
tar -C /usr/local -xzf `basename $ROOT_DIST`
23-
rm -f `basename $ROOT_DIST`
22+
tar -C /usr/local -xzf "$(basename "$ROOT_DIST")"
23+
rm -f "$(basename "$ROOT_DIST")"
2424

2525
export GOROOT=/usr/local/go
2626
fi

0 commit comments

Comments
 (0)