jenkinsci / jenkinsci/durable-task-plugin

[JENKINS-29877] failure when incorrect shell is configured is not clear enough to diagnose root cause.

Open
#336 3 comments 0 reactions 0 assignees View on GitHub
component:durable-task-plugin imported-jira-issue pipeline priority:minor resolution:unresolved
Dominant language
Java
Stars
30
Forks
101
PR merge metrics
No merged PRs in 30d

Description

If you have a shell configured in "manage jenkins" and that shell is not available on the slave used by a workflow sh step, then the error does not help you diagnose the issue.

e.g.

```
node ('different_slave') {
sh 'echo hello'
}

```

produces the following error

```
[workflow_test] Running shell script
sh: 1: /home/jenkins/slave/workspace/workflow_test/.e59a0d2c/script.sh: not found

```

this implies an error with Jenkins code and not the configuration.

Compare this to the same failure in a FreeStyle Job

```
[huh] $ c:\cygwin64\bin\bash -xe /tmp/hudson2505861960930827932.sh
FATAL: command execution failed
java.io.IOException: Cannot run program "c:\cygwin64\bin\bash" (in directory "/home/jenkins/slave/workspace/huh"): error=2, No such file or directory

```

Notice how the FreeStyle is explicit about which shell it is trying to run and what could not be found.

---
Originally reported by teilo, imported from: failure when incorrect shell is configured is not clear enough to diagnose root cause.


  • assignee: jglick
  • status: Open
  • priority: Minor
  • component(s): durable-task-plugin
  • label(s): diagnostics, pipeline, triaged-2018-11
  • resolution: Unresolved
  • votes: 3
  • watchers: 4
  • imported: 2025-12-09

Raw content of original issue

If you have a shell configured in "manage jenkins" and that shell is not available on the slave used by a workflow sh step, then the error does not help you diagnose the issue.

e.g.


node ('different_slave') {

sh 'echo hello'
}

produces the following error



[workflow_test] Running shell script

sh: 1: /home/jenkins/slave/workspace/workflow_test/.e59a0d2c/script.sh: not found

this implies an error with Jenkins code and not the configuration.

Compare this to the same failure in a FreeStyle Job



[huh] $ c:\cygwin64\bin\bash -xe /tmp/hudson2505861960930827932.sh

FATAL: command execution failed
java.io.IOException: Cannot run program "c:\cygwin64\bin\bash" (in directory "/home/jenkins/slave/workspace/huh"): error=2, No such file or directory

Notice how the FreeStyle is explicit about which shell it is trying to run and what could not be found.

environment

```
jenkis 1.609.1

workflow 1.9-beta-1
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.