If the root path contains spaces, it won't work.

phing-drupal > make:

   [delete] Directory /opt/jenkins/.jenkins/jobs/Company Intranet/workspace/www does not exist or is not a directory.
     [echo] /opt/jenkins/.jenkins/jobs/Company Intranet/workspace/build-companyintranet.make
[reflexive] Applying reflexive processing to 3 files.
    [drush] Executing 'drush --nocolor --root=/opt/jenkins/.jenkins/jobs/Company Intranet/workspace/www --yes make /opt/jenkins/.jenkins/jobs/Company Intranet/workspace/build-companyintranet.make www'...
The drush command 'Intranet/workspace/www make                           [error]
/opt/jenkins/.jenkins/jobs/Company
Intranet/workspace/build-companyintranet.make www' could not be found. 
Run `drush cache-clear drush` to clear the commandfile cache if you have installed new extensions.
A Drupal installation directory could not be found                       [error]
Execution of target "make" failed for the following reason: /home/jenkins/.jenkins/jobs/Company Intranet/workspace/build/build.xml:908:8: /home/jenkins/.jenkins/jobs/Company Intranet/workspace/build/build.xml:933:12: /home/jenkins/.jenkins/jobs/Company Intranet/workspace/build/build.xml:963:34: Drush exited with code 1

CommentFileSizeAuthor
#5 2418619.patch635 bytespol
#4 2418619.patch371 bytespol
#3 2418619.patch371 bytespol

Comments

pbuyle’s picture

In DrushOption::toString(), the value of the option should be escaped with escapeshellarg().

pol’s picture

Assigned: Unassigned » pol

Voila.

pol’s picture

Status: Active » Needs review
StatusFileSize
new371 bytes
pol’s picture

StatusFileSize
new371 bytes

This is the good patch.

pol’s picture

StatusFileSize
new635 bytes
pol’s picture

Status: Needs review » Reviewed & tested by the community

I finally confirm that it works with the patch.

Here is the build.xml example file that I used:

<?xml version="1.0" encoding="UTF-8"?>
<project name="phing-drupal" default="build" phingVersion="2.4.11">

<target name="build">

 <taskdef name="drush" classname="DrushTask" />

 <drush command="make" assume="yes">
   <param>/opt/jenkins/.jenkins/jobs/EASME Intranet/workspace/build-easmeintranet.make</param>
   <param>www</param>
 </drush>

</target>
pol’s picture

  • pbuyle committed 5cb729b on 7.x-1.x authored by Pol
    Issue #2418619 by Pol: If the root path contains spaces, it won't work
    
pfrenssen’s picture

Assigned: pol » Unassigned
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.