mirror of
https://github.com/aljazceru/cdk.git
synced 2026-02-22 13:36:00 +01:00
chore: update flakebox files
This commit is contained in:
@@ -132,8 +132,13 @@ export -f check_trailing_newline
|
||||
function check_trailing_whitespace() {
|
||||
set -euo pipefail
|
||||
|
||||
if ! git diff --check HEAD ; then
|
||||
echo "Trailing whitespace detected. Please remove them before committing."
|
||||
rev="HEAD"
|
||||
if ! git rev-parse -q 1>/dev/null HEAD 2>/dev/null ; then
|
||||
>&2 echo "Warning: no commits yet, checking against --root"
|
||||
rev="--root"
|
||||
fi
|
||||
if ! git diff --check $rev ; then
|
||||
>&2 echo "Trailing whitespace detected. Please remove them before committing."
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user