Can't run script from work directory of project with space names

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Steps to reproduce:

      1. Create a project with a space in the name, e.g. "Test project"
      2. Run the following shell command on build: /usr/local/bin/python $WORKSPACE/build.py
      3. Run the build
      4. Receive following output as console output:
      Started by timer
      Building in workspace /Users/Shared/Jenkins/Home/jobs/Test project/workspace
      [workspace] $ /bin/sh -xe /Users/Shared/Jenkins/tmp/hudson8678281940954009674.sh
      + /usr/local/bin/python /Users/Shared/Jenkins/Home/jobs/Test project/workspace/build.py
      /usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/Users/Shared/Jenkins/Home/jobs/Test': [Errno 2] No such file or directory
      Build step 'Execute shell' marked build as failure
      Finished: FAILURE
      

      The space in "Test project" is not escaped and causes a failure.

      Workaround is to rename the project to not contain spaces.

            Assignee:
            Unassigned
            Reporter:
            Alexei B
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: