Skip to content

Commit

Permalink
github/govuln: don't swallow govulncheck errors
Browse files Browse the repository at this point in the history
By running `find -exec`, an error exit code doesn't properly return the
error if there's a failure in a command executed. Use `xargs` to force
an exit with error when a command fails to run.

Signed-off-by: Ivan Valdes <[email protected]>
  • Loading branch information
ivanvc committed Jun 29, 2024
1 parent 8fde09b commit 20f7988
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/govuln.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
go install golang.org/x/vuln/cmd/govulncheck@latest
find -name go.mod -exec /bin/bash -c 'echo scanning $(dirname {}); govulncheck -C $(dirname {}) -show verbose ./...' \;
find . -name go.mod | xargs -I'{}' /bin/bash -c 'echo scanning $(dirname {}); govulncheck -C $(dirname {}) -show verbose ./...'

0 comments on commit 20f7988

Please sign in to comment.