I often receive installer issues in "Custom Tools Plugin", which complain about "Run Command" behavior. Seems that its name and documentation are quite confusing, so I propose to slightly refactor them.

      An original issue from James Hancox:

      When I try to use the custom tools plugin to install a tool named "VxrAnt", I get the following error message:

      Started by user anonymous
      [CustomTools] - VxrAnt: Starting installation
      [VxrAnt] $ sh -e D:\projects\tools\com.cloudbees.jenkins.plugins.customtools.CustomTool\VxrAnt\hudson7649328509533676101.sh
      The system cannot find the file specified
      FATAL: Cannot run program "sh" (in directory "D:\projects\tools\com.cloudbees.jenkins.plugins.customtools.CustomTool\VxrAnt"): CreateProcess error=2, The system cannot find the file specified
      java.io.IOException: Cannot run program "sh" (in directory "D:\projects\tools\com.cloudbees.jenkins.plugins.customtools.CustomTool\VxrAnt"): CreateProcess error=2, The system cannot find the file specified
      at java.lang.ProcessBuilder.start(Unknown Source)
      at hudson.Proc$LocalProc.<init>(Proc.java:244)
      at hudson.Proc$LocalProc.<init>(Proc.java:216)
      at hudson.Launcher$LocalLauncher.launch(Launcher.java:773)
      at hudson.Launcher$ProcStarter.start(Launcher.java:353)
      at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:998)
      at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:965)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at hudson.remoting.Engine$1$1.run(Engine.java:63)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
      at java.lang.ProcessImpl.create(Native Method)
      at java.lang.ProcessImpl.<init>(Unknown Source)
      at java.lang.ProcessImpl.start(Unknown Source)
      ... 16 more

      As my install script does not call sh, I can only assume that this is part of the internal workings of the custom tools plugin which has gone awry.

          [JENKINS-20976] Tool tries to access non-existent file

          Oleg Nenashev added a comment -

          "Run command" installation step invokes "sh" by default.
          This name is quite confusing, but it is defined in Jenkins core..

          If you want to run Batch command, you can get such installer in https://wiki.jenkins-ci.org/display/JENKINS/Extra+Tool+Installers+Plugin
          Does it solve your issue?

          Oleg Nenashev added a comment - "Run command" installation step invokes "sh" by default. This name is quite confusing, but it is defined in Jenkins core.. If you want to run Batch command, you can get such installer in https://wiki.jenkins-ci.org/display/JENKINS/Extra+Tool+Installers+Plugin Does it solve your issue?

          James Hancox added a comment -

          Aha, that does seem to solve it! Rookie mistake Feel free to close this issue.

          James Hancox added a comment - Aha, that does seem to solve it! Rookie mistake Feel free to close this issue.

          Oleg Nenashev added a comment -

          No problems.
          I'll restructure this issue and assign it to the core

          Oleg Nenashev added a comment - No problems. I'll restructure this issue and assign it to the core

          Oleg Nenashev added a comment -

          Just FYI, https://github.com/jenkinsci/jenkins/pull/1078 should prevent such confusions

          Oleg Nenashev added a comment - Just FYI, https://github.com/jenkinsci/jenkins/pull/1078 should prevent such confusions

          Oleg Nenashev added a comment -

          It has been fixed and released in 1.549

          Oleg Nenashev added a comment - It has been fixed and released in 1.549

            oleg_nenashev Oleg Nenashev
            james_hancox James Hancox
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: