Skip to content

Commit 631f3ed

Browse files
committed
Provide feedback when scripts/format-changelogs.sh is used interactively
1 parent 37f81ae commit 631f3ed

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

scripts/format-changelogs.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,12 @@ fi
1111

1212
clrt changelogs -i "${FILES[@]}"
1313

14-
git diff -s --exit-code "${FILES[@]}"
14+
if ! git diff -s --exit-code "${FILES[@]}"
15+
then
16+
if [ -t 2 ]
17+
then
18+
# shellcheck disable=SC2016
19+
echo 'Some changelogs were modified - use `git diff` to see the changes' >&2
20+
fi
21+
false
22+
fi

0 commit comments

Comments
 (0)