Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-18822

Unable to use default rake on Windows with certain JREs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • rake-plugin
    • JRE 1.7.21 - JRE 1.7.25 on Windows

      Create a job with a rake step that is to use the default rake installation and then run the job on a Windows agent that has one of the affected JREs in use. The job will fail with:

      [workspace] $ rake.bat
      '"C:\path\to\Jenkins\jobs\jobName\workspace\ruby.exe"' is not recognized as an internal or external command,
      operable program or batch file.
      Build step 'Invoke Rake' marked build as failure
      

      This appears to be caused by JDK-8016721 : (process) Behavior of %~dp0 in .cmd and .bat scripts has changed whereby affected JRE versions try to create a sub-process with:

      cmd  /c ""rake.bat""
      

      ...instead of:

      cmd  /c rake.bat
      

      ...as previous versions of the JRE used to.

      When configuring a non-default rake installation, the path to the batch file will be absolute and this seems to not break rake.bat.

            oli_at_jsi Olivier Dagenais
            oli_at_jsi Olivier Dagenais
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: