[[ operator is a bash feature and is not available on regular shell: https://stackoverflow.com/questions/3401183/bash-syntax-error-not-found Hence, previously this was not failing because bash was being used but now it is failing because sh is being used after the husky upgrade. So, the shell script needs to use grep instead of [[]] now for it to work properly.
The the reason for this failure was in https://github.com/iTwin/eslint-plugin/pull/51, husky was upgraded to v9. The way husky executes shell scripts is different in v9. It always uses
sh
instead ofbash
: https://github.com/typicode/husky/releases/tag/v9.0.1[[
operator is a bash feature and is not available on regular shell: https://stackoverflow.com/questions/3401183/bash-syntax-error-not-found Hence, previously this was not failing becausebash
was being used but now it is failing becausesh
is being used after the husky upgrade. So, the shell script needs to usegrep
instead of[[]]
now for it to work properly.Working example: https://github.com/iTwin/eslint-plugin/actions/runs/7937037057/job/21673467158