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

Add quotes for the pipeline workspace that has empty spaces

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • nvm-wrapper-plugin
    • None
    • Jenkins 2.479.1 on Ubuntu 24.04

      My Jenkins pipelines contains blank spaces(e.g. draft Cypress tests clean)
      Using the nvm plugin causes a problem:

      Installing nvm
      [draft Cypress-tests-clean-env] $ bash -c "NODE_VERSION=18.16.1 NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist NVM_PROFILE=/dev/null /home/azureuser/workspace/draft Cypress-tests-clean-env/nvm-installer"
      bash: line 1: /home/azureuser/workspace/draft: No such file or directory 

      Is there any way to add quotes to the path?
      https://github.com/jenkinsci/nvm-wrapper-plugin/blob/ad0ee78a64ae18d4f315e6f65dd41058600d29ce/src/main/java/org/jenkinsci/plugins/nvm/NvmWrapperUtil.java#L158
      For example:

      cmdBuild.add("\"" + installer.absolutize().getRemote()+ "\""); 

       

            atoms Tomas Salazar
            obyivan Ivan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: