1

I have got a Hudson Slave on a windows machine and need to execute some shell commands on it. I have put all the commands in the execute shell portion of the project and the first line reads as this:

#!C:\msysgit\msysgit\bin\sh.exe

However when running the project I am getting errors saying command not found. Specifically for git, cd, make, rm and I would presume more. I feel like this is a simple thing to fix but can't figure it out. The script works fine when using msysGit on the machine but I am having trouble doing it through Hudson. Any help would be appreciated. I need to be using msysGit not Cygwin.

1 Answers1

2

You could start by making that script displays:

And see what those variables reference in the context of an Hudson job.
They might not reflect/inherit the values of your current session.
And it can depend on how you did install msysgit.


The OP Zack Lalanne mentions in the comment he just need to have:

 #!C:\msysgit\bin\sh.exe --login -i

which means the bash session will inherit his environment variables, making the job much likely to run than without the user's environment.

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283