Add quotes for the pipeline workspace that has empty spaces

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • Component/s: nvm-wrapper-plugin
    • None
    • Environment:
      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()+ "\""); 

       

            Assignee:
            Tomas Salazar
            Reporter:
            Ivan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: