0

I have Cygwin and its bin path is in the path variable. My .sh file association is set to bash.exe. However, when I try to execute a shell script from a Jenkins build, I get the following error:

The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: Cannot run program "sh"

Other posts have indicated this could be an issue with the .sh file association, but I don't see why that would be the case when I'm able to execute .sh files just fine outside of Jenkins. Can anyone tell me if I'm missing a step here? Thanks in advance.

1
  • Are you attempting to execute sh anywhere? Because that error message seems to mean that java tried to find the sh executable and could not do so. Commented Sep 16, 2014 at 20:00

1 Answer 1

1

hmm... running jenkins on windows and using cygwin doesn't sound good. are you sure that the command sh is available in your environment? maybe try sh.exe that might work. otherwise start cygwin with bash.exe and try to set an the alias sh to sh.exe... something like that

Sign up to request clarification or add additional context in comments.

1 Comment

...User error. Oops. I had accidentally terminated the Cygwin process and just had to fire her up again. Thanks anyways!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.