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

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

    • 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.

          [JENKINS-29764] Can't run script from work directory of project with space names

          Alexei B created issue -
          Alexei B made changes -
          Description Original: Steps to reproduce:

          # Create a project with a space in the name, e.g. "Test project"
          # Run the following shell command on build: `/usr/local/bin/python $WORKSPACE/build.py`
          # Run the build
          # Receive following output as console output:



          {code:java}
          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
          {code}

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

          Workaround is to rename the project to not contain spaces.
          New: Steps to reproduce:

          # Create a project with a space in the name, e.g. "Test project"
          # Run the following shell command on build: /usr/local/bin/python $WORKSPACE/build.py
          # Run the build
          # Receive following output as console output:



          {code:java}
          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
          {code}

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

          Workaround is to rename the project to not contain spaces.
          Daniel Beck made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 164840 ] New: JNJira + In-Review [ 197557 ]
          Alexander Amelkin made changes -
          Resolution Original: Not A Defect [ 7 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          Daniel Beck made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Reopened [ 4 ] New: Resolved [ 5 ]

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

              Created:
              Updated:
              Resolved: