We installed drush on windows xp using the windows installer from drush.ws
We then did a "drush status" in our sites root directory and it ran as expected.
5.8 works great

We then downloaded drush 8.x-6.x-dev from drupal.org/project/dush
Extract the zip to a temp directory.
Renamed the existing directory c/Documents and Settings/All Users/Application Data/Drush to ... Drush_old
Copied the newly extracted drush directory to c/Documents and Settings/All Users/Application Data/Drush.

below is the output from when we ran drush status, drush dl backup_mirgrate, and drush site-alias. The main issue is we get the error message

/c/Documents and Settings/All Users/Application Data/Drush/drush: line 82: [: too many arguments
sh: line 0: cd: /c/Documents: No such file or directory"

Here is our output

$ drush status
/c/Documents and Settings/All Users/Application Data/Drush/drush: line 82: [: too many arguments
sh: line 0: cd: /c/Documents: No such file or directory
 PHP configuration     :  "C:\Program Files\Drush\Php\php.ini"
 Drush version         :  6.0-dev
 Drush configuration   :
 Drush alias files     :

Cindy@OWNER-6D28F5B7A /c/xampp/htdocs/beel
$ drush dl backup_migrate
/c/Documents and Settings/All Users/Application Data/Drush/drush: line 82: [: too many arguments
sh: line 0: cd: /c/Documents: No such file or directory
Project backup_migrate (7.x-2.7) downloaded to                         [success]

sites/all/modules/backup_migrate.

Cindy@OWNER-6D28F5B7A /c/xampp/htdocs/beel
$ drush site-alias
/c/Documents and Settings/All Users/Application Data/Drush/drush: line 82: [: too many arguments
sh: line 0: cd: /c/Documents: No such file or directory
CND_local
CND_remote
SOA_local
SOA_remote
none
self

Also, when we run the drush status in a windows cmd (dos window) it runs fine. No error messages. But when we run it in a git bash window, you see the above errors. I check the path for both environments and they are the same.

I am including the path just in case someone needs it:

C:\WINDOWS\system32;
C:\WINDOWS;
C:\WINDOWS\System32\Wbem;
C:\Program Files\Common Files\Roxio Shared\DLLShared\;
C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;
c:\Program Files\Common Files\Intuit\QBPOSSDKRuntime;
C:\Program Files\Common Files\HP\Digital Imaging\\bin;
C:\Program Files\Common Files\Teleca Shared;
C:\Program Files\Git\cmd;
C:\Program Files\QuickTime\QTSystem\;
C:\Ruby200\bin;
C:\Program Files\Perforce;
C:\Program Files\nodejs\;
C:\Ruby2000\bin;
C:\Documents and Settings\Cindy\Application Data\npm;
C:\Program Files\drush;
C:\Documents and Settings\All Users\Application Data\Drush;
C:\Program Files\Drush\GnuWin32\bin;
C:\Program Files\Drush\Php;
C:\Program Files\Drush\cwRsync\bin

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cdykstra’s picture

subscribe

greg.1.anderson’s picture

Status: Active » Fixed

Fixed quoting problem in drush script and committed to 8.x-6.x-dev. Did not test on Windows; re-open if problems persist.

greg.1.anderson’s picture

Also cherry-picked the same commit on 7.x-5.x, as this was a problem there too.

densolis’s picture

Status: Fixed » Active

We just installed drush 8.x-6.x-dev today. It is still a problem on Windows XP. It works fine Windows 7.

densolis’s picture

Sorry, did not understand this comment "Also cherry-picked the same commit on 7.x-5.x, as this was a problem there too."

Can you suggest where I should look for the code. I'm not sure from what program / script this is begin generated in.

But yes, we used the latest dev version on drupal.org/project/drush.

greg.1.anderson’s picture

Status: Active » Fixed

I only committed the change this morning; the "latest dev release", although timestamped 2013-Jun-05, does not have the fix in it.

To confirm, please check out from git directly, following the instructions here:

https://drupal.org/project/drush/git-instructions

Alternately, wait for Drupal.org to roll a new dev release, timestamped 2013-Jun-06 (tomorrow) or later.

cdykstra’s picture

Ah, that makes more sense then. I'll grab the release from d.o tomorrow and report back on how it goes. Thanks for clearing that up.

cdykstra’s picture

I went ahead and checked out from git and it seems to have taken care of the Too many arguments snippet.

Although now I'm still seeing in git bash window.
$ drush status
and: line 0: cd: /c/Documents: No such file or directory
and: line 0: cd: /c/Documents: No such file or directory
PHP configuration : "C:\Program Files\Drush\Php\php.ini"
Drush version : 6.0-dev
Drush configuration :
Drush alias files :

Running in a Window command prompt, I get this:
C:\Documents and Settings\Cindy>drush status
PHP configuration : "C:\Program Files\Drush\Php\php.ini"
Drush version : 6.0-dev
Drush configuration :
Drush alias files :

Running in Windows XP.

greg.1.anderson’s picture

Status: Fixed » Needs review
FileSize
783 bytes

Sorry, I didn't do that quite right for MINGW. Try this patch.

cdykstra’s picture

The patch worked great for me. Thank you!

moshe weitzman’s picture

Status: Needs review » Fixed

Committed to 6.

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

Anonymous’s picture

Issue summary: View changes

Update the original message.