seeing this: How to set the PATH environment variable in Jenkins configuration on Windows?
I set my path on my windows slave like this:
Then tried running this in a pipeline:
sh script: "echo sdfsdfsdf"
And I get error:
java.io.IOException: CreateProcess error=2, The system cannot find the file specified
EDIT: OK something weird is happening and I dont understand this behavior. I added "C:\Program Files\Git\usr\bin\" to the system path on the slave directly and restarted agent then this started working:
sh script: "echo sdfsdfsdf"
But this threw "cmd.exe" not found:
bat script: "echo sdfsdfsdf"
Then I removed the Path env from the slave and now BOTH work.
So that setting on the slave was doing something, what? I have no idea. Really like to just use that setting instead of having an external slave config like this.