diff --git a/scripts/check-no-binaries.sh b/scripts/check-no-binaries.sh index 9aa5e0e..7378997 100755 --- a/scripts/check-no-binaries.sh +++ b/scripts/check-no-binaries.sh @@ -6,7 +6,7 @@ cd "$(git rev-parse --show-toplevel)" types='application/(x-(executable|pie-executable|sharedlib|object|archive|mach-binary|dosexec)|vnd\.microsoft\.portable-executable|java-archive|x-java-applet|wasm)$' # Add a pathspec exclusion such as ':!gradle/wrapper/gradle-wrapper.jar' only for a # binary the repo must carry, with the reason beside it. -found=$(git ls-files -z -- . | xargs -0 -r file --mime-type -- | grep -E "$types" || true) +found=$(git ls-files -z -- . | sed -z 's|^|./|' | xargs -0 -r file --mime-type -- | grep -E "$types" || true) if [ -n "$found" ]; then echo "Compiled binaries are tracked; build them from source instead:" >&2 echo "$found" >&2