Fix typo in validation for mac
authorKrzGalcz <k.galczynski@eyeo.com>
Wed, 13 Nov 2024 15:40:20 +0100
changeset 25714 074ea5523f84
parent 25713 bf90446a27cb
child 25715 3200f6603386
Fix typo in validation for mac
pre-commit-src/pre-commit-script.sh
--- a/pre-commit-src/pre-commit-script.sh
+++ b/pre-commit-src/pre-commit-script.sh
@@ -28,17 +28,17 @@ testing=false
 # In general running this script directly within windows is very slow, so use of WSL2 is recommended but in case of some tests performed in windows, those lines are still needed.
 if [ $OSTYPE = 'msys' ] || [ $OSTYPE = 'cygwin' ]; then
     alias jq='jq -b'
 else
     alias jq='command jq'
 fi
 
 # Mac grep doesn't have Perl regex, therefor it needs to be checked with another method
-if [ $OSTYPE = 'darwin'* ]; then
+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 "${WSL_DISTRO_NAME:-}" ]; then
     alias git='git.exe'