You could try changing your sh invocation to something like the following:

sh """\
#!/bin/sh
echo hello sh!
"""

This would force the interpreter to use whatever is setup as sh in your
environment. I believe sh uses bash by default, but if you don't have it
installed, that would be a problem.



On Mon, Jun 20, 2016 at 11:34 AM Craig Rodrigues <rodr...@freebsd.org>
wrote:

> Hi,
>
> When you use *sh* in a Pipeline, and you need to debug weird things,
> then you need to look at the source code of the Durable Task plugin to
> figure out what is going on,
> because that is what is executing the underlying shell.  Specifically,
> look at this:
>
>
> https://github.com/jenkinsci/durable-task-plugin/blob/master/src/main/java/org/jenkinsci/plugins/durabletask/BourneShellScript.java#L98
>
> It's a bit hard to figure out what is going on in your environment, but
> one question I have is.....do you have bash installed on your system,
> and if so, where is it?
>
> If you can somehow save a copy of the  durable-ae020333/script.sh
>
> that would help debug things.
>
> --
> Craig
>
>
> On Mon, Jun 20, 2016 at 11:21 AM, Mike Chmielewski <
> mike.chmielew...@gmail.com> wrote:
>
>
>> [t1] Running shell script
>> sh: <PATH_TO_AGENT_WORKSPACE_ROOT>/t1@tmp/durable-ae020333/script.sh: bash: 
>> bad interpreter: No such file or directory
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CAG%3DrPVc09mh%3Dqk0pqDjMSq1W8k5WOa3T4OmJUiZ4A6jgAivU%3Dg%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAG%3DrPVc09mh%3Dqk0pqDjMSq1W8k5WOa3T4OmJUiZ4A6jgAivU%3Dg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVea0cG2v8cku_DWZvJt3gxrdAyKe%2BEh9bv%3DCFN0X-uecg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to