-
-
Couldn't load subscription status.
- Fork 57
Closed
Description
The ends_with_newline() function in developer-scripts/git-hooks/pre-commit produces an error when being called from a linux machine.
function ends_with_newline() {
test ! -s "$1" || test $(tail -r -c1 "$1" | xxd -ps) = "0a"
}
The error reported is tail: invalid option -- 'r'. The linux tail does not have a -r option while the osx tail does. The function is only checking the last character so I belief it doesn't matter if the tail output is in reverse order. I think this issue can be fixed by simply removing the -r option.
Reproducing the error should be possible by
- use linux
- configuring your local repository with the whitespace settings by running ./developer-scripts/setup-git.sh
- attempting to commit a file.
Metadata
Metadata
Assignees
Labels
No labels