forked from clan/clan-core
pre-commit: fix weird bug where commit_files is undefined in bash
This commit is contained in:
parent
6c169b0bed
commit
caa1c0dfd8
@ -18,7 +18,7 @@ log() {
|
||||
}
|
||||
|
||||
# If the commit has no files, skip everything as there is nothing to format
|
||||
if [[ ${#commit_files} = 0 ]]; then
|
||||
if [[ -z ${commit_files+x} ]] || [[ ${#commit_files} = 0 ]]; then
|
||||
log "no files to format"
|
||||
exit 0
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user