This commit is contained in:
@@ -27,8 +27,13 @@ echo "Parsing go version"
|
||||
# -P uses perl syntax
|
||||
DL_VERSION_RAW="$(grep "^go [0-9]+.[0-9]+" go.mod -P)"
|
||||
if [[ -z "$DL_VERSION_RAW" ]]; then
|
||||
echo "FATAL: Unable to pull version from go.mod"
|
||||
exit 1
|
||||
#no go.mod file found
|
||||
DL_VERSION_RAW=$GO_INSTALL_VERSION
|
||||
#no version input set either
|
||||
if [[ "$DL_VERSION_RAW" == "." ]]; then
|
||||
echo "FATAL: No Go version found, set version input if no go.mod file is present"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
echo "Found go version: ${DL_VERSION_RAW}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user