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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • core
    • Mac OSX 10.10.3

      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.

            Unassigned Unassigned
            plasmasheep Alexei B
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: