Do not pipe Git output into a pager. (#17442)

This commit is contained in:
Mashhur 2025-03-28 10:56:39 -07:00 committed by GitHub
parent e5bebcea17
commit 4b88773726
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,7 +19,7 @@ changed_files=$(git diff --name-only $previous_commit)
if [[ -n "$changed_files" ]] && [[ -z "$(echo "$changed_files" | grep -vE "$1")" ]]; then
echo "All files compared to the previous commit [$previous_commit] match the specified regex: [$1]"
echo "Files changed:"
git diff --name-only HEAD^
git --no-pager diff --name-only HEAD^
exit 0
else
exit 1