Skip to content

Commit f5a8256

Browse files
committed
Use -execdir instead of xargs
Signed-off-by: Thomas Stromberg <[email protected]>
1 parent 58f0bad commit f5a8256

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lint-install.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ func goLintCmd(root string, level string, fix bool) string {
193193
return fmt.Sprintf("out/linters/golangci-lint-$(GOLINT_VERSION)-$(LINT_ARCH) run%s", suffix)
194194
}
195195

196-
return fmt.Sprintf(`find . -name go.mod | xargs -n1 dirname | xargs -n1 -I{} sh -c "cd {} && $(LINT_ROOT)/out/linters/golangci-lint-$(GOLINT_VERSION)-$(LINT_ARCH) run -c $(GOLINT_CONFIG)"%s`, suffix)
196+
return fmt.Sprintf(`find . -name go.mod -execdir "$(LINT_ROOT)/out/linters/golangci-lint-$(GOLINT_VERSION)-$(LINT_ARCH)" run -c "$(GOLINT_CONFIG)"%s \;`, suffix)
197197
}
198198

199199
// shellLintCmd returns the appropriate shell lint command for a project.

0 commit comments

Comments
 (0)