Skip to content

Commit

Permalink
test: add -go flag to go tool fix
Browse files Browse the repository at this point in the history
Add -go flag to go tool fix to correctly set the go version.
A change external to the codebase is causing the default go version
to not populate.

fixes: coreos#1950
  • Loading branch information
prestist committed Oct 10, 2024
1 parent 40fc547 commit 28a82ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ PKG_VET=$(go list ./... | \
grep --invert-match internal/log)

echo "Checking gofix..."
go tool fix -diff $SRC
# https://github.com/coreos/ignition/issues/1950
go_version=$(go version | awk '{print $3}')
go tool fix -go="$go_version" -diff $SRC

echo "Checking gofmt..."
res=$(gofmt -d -e -s $SRC)
Expand Down

0 comments on commit 28a82ec

Please sign in to comment.