Skip to content

Commit

Permalink
fix(make): fail on non-zero status
Browse files Browse the repository at this point in the history
Apparently, find doesn't return a non-zero status when a command exits with a
non-zero status.
  • Loading branch information
Stebalien committed Feb 7, 2020
1 parent 295d06f commit 929883f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
@@ -1,7 +1,8 @@
GOTFLATS ?=

define eachmod
@find . -type f -name go.mod -exec bash -c 'dir="$$(dirname {})" && cd "$${dir}" && echo "$${dir}: $(1)" && $(1)' \;
@echo '$(1)'
@find . -type f -name go.mod -print0 | xargs -I '{}' -n1 -0 bash -c 'dir="$$(dirname {})" && echo "$${dir}" && cd "$${dir}" && $(1)'
endef

pre-commit:
Expand Down

0 comments on commit 929883f

Please sign in to comment.