开发者

Hudson slave using msysGit shell

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 msysG开发者_JS百科it not Cygwin.


You could start by making that script displays:

  • the username
  • the path
  • the $HOME (important for ssh operation, and not always set correctly on Windows)

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜