fixing mod commands and jq outputs

This commit is contained in:
2026-04-03 15:33:31 -04:00
parent 1aff578a13
commit d54c42045a

View File

@@ -7,10 +7,10 @@ if [[ "$STATIC_FLAG" == "no" && "$VULN_CHECK" == "no" ]]; then
exit 0;
fi
toolchain=$(go mod edit go.mod -json | jq ".Toolchain");
toolchain=$(go mod edit -json go.mod | jq -r ".Toolchain");
echo "[DEBUG] $toolchain found in go.mod";
version=$(go env -json | jq ".GOVERSION");
version=$(go env -json | jq -r ".GOVERSION");
echo "[DEBUG] $version found in go env";
if [[ ! -z "$toolchain" ]]; then