pre-commit hook doesn't recognize powershell scripts as executables
When committing a .ps1
file with executable permissions in VTK, the pre-commit hook rejected it with a message:
The file '.gitlab/ci/chrome.ps1' has executable mode but does not look executable.
On UNIX, run:
$ chmod u-x '.gitlab/ci/chrome.ps1' && git add -u '.gitlab/ci/chrome.ps1'
On Windows, run:
$ git update-index --chmod=-x '.gitlab/ci/chrome.ps1'
After committing without executable permissions, like the pre-commit hook message asks, the robot complains on the merge request that the file looks like an executable but does not have executable permissions. See vtk/vtk!11099 (comment 1516062)
Finally, I had to use --no-verify
during commit to keep the robot happy. I think there is a conflict b/w the hook and robot. The hooks se .ps1
as a non-executable when the robot thinks it is.