--- a/pre-commit-src/pre-commit-script.sh
+++ b/pre-commit-src/pre-commit-script.sh
@@ -35,17 +35,17 @@ fi
# Mac grep doesn't have Perl regex, therefor it needs to be checked with another method
if [ $OSTYPE = 'darwin'* ]; then
alias grep='ggrep'
else
alias grep='command grep'
fi
# In case on WSL (Windows) it's faster to invoke git.exe directly from Windows (since the files are in the windows FS).
-if [ -n $(echo $WSL_DISTRO_NAME || echo '') ]; then
+if [ -n "${WSL_DISTRO_NAME:-}" ]; then
alias git='git.exe'
else
alias git='command git'
fi
error_handler() {
local exit_code=$?
local line_number=$1