Description
Steps to reproduce
- Create a command task with the path pointing to a shell command say echo for example. See the attached screenshot
- When this is run against an older version of Bamboo, it runs fine despite the error message that "Unable to find executable at echo"
error 03-Sep-2013 16:58:50 Unable to find executable at echo command 03-Sep-2013 16:58:50 Beginning to execute external process for build 'TESTA - TSTA - Default Job'\n ... running command line: \necho 2 > sultan.txt\n ... in: D:\atlassian\BAMBOO\atlassian-bamboo-4.4.4\HOME\xml-data\build-dir\TESTA-TSTA-JOB1\n
- Now if this is done in the latest Bamboo 5.1, it fails with the build logs throwing something like
error 03-Sep-2013 17:02:19 Unable to find executable at echo command 03-Sep-2013 17:02:19 Beginning to execute external process for build 'TESTA - TSTA - Default Job #17 (TESTA-TSTA-JOB1-17)'\n ... running command line: \necho 17 > sultan.txt\n ... in: D:\atlassian\BAMBOO\atlassian-bamboo-5.1.0\HOME\xml-data\build-dir\TESTA-TSTA-JOB1\n simple 03-Sep-2013 17:02:19 Failing task since return code of [echo 17 > sultan.txt] was -1 while expected 0
The atlassian-bamboo.log shows something like:
com.atlassian.utils.process.ProcessNotStartedException: echo could not be started at com.atlassian.utils.process.ExternalProcessImpl.start(ExternalProcessImpl.java:288) at com.atlassian.utils.process.ExternalProcessImpl.execute(ExternalProcessImpl.java:409) at com.atlassian.bamboo.process.ProcessServiceImpl.executeExternalProcess(ProcessServiceImpl.java:211) at com.atlassian.bamboo.plugins.shell.task.AbstractShellBuildTask.execute(AbstractShellBuildTask.java:61) at com.atlassian.bamboo.plugins.shell.task.AbstractShellBuildTask.execute(AbstractShellBuildTask.java:48) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:220) at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:98) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:75) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:189) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:102) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:108) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:55) at java.lang.Thread.run(Thread.java:724)