java.io.IOException: Cannot run program "sh"

Viewed 331

I am trying to run postman collection in jenkins getting below error Could you please help on it . Thanks.

Running as SYSTEM Building in workspace C:\Users.jenkins\workspace\Postman [Postman] $ sh -xe C:\Users\AppData\Local\Temp\12\jenkins4131098184637934114.sh The system cannot find the file specified FATAL: command execution failed

Caused: java.io.IOException: Cannot run program "sh" (in directory "C:\Users.jenkins\workspace\Postman"): CreateProcess error=2, The system cannot find the file specified

1 Answers

The answer was provided here, you have two options:

  1. On your {jenkinsUrl}/job/{jobName}/configure build step you can choose "Execute Windows batch command" rather than "Execute shell"

  2. In Manage Jenkins -> Configure System -> Shell, set the shell path as

    C:\Windows\system32\cmd.exe

Related