We have a very simple script running as a pre-commit hook for GIT on windows, here is the script:
#!/bin/sh
# important that it's got the .exe on the end!
cmd.exe /c "run-tests-commit.cmd"
This script is designed to run our unit tests and prevent commit of broken code, but it has stopped working on the machines of some of our team.
Our script works perfectly on the command line, and within Visual Studio 2022 up until a few months ago. However since a change in visual studio a little while ago the run-test-commit.cmd script is not run. The script output looks like this:
Microsoft Windows [Version 10.0.22631.3880]
(c) Microsoft Corporation. All rights reserved.
C:projectsxxx>
As if no argument was passed to cmd.exe.
Is there something wrong with our sh script? Or some alternative syntax I can try for this script that might work around whatever bug they have introduced into the embedded visual studio shell?