1

When I execute drush up, it returns the following error message.

The command could not be executed successfully (returned: The filename, directory name, or volume label syntax is incorrect, code: 1) pm-updatestatus failed.

drush pm-updatestatus runs without errors.

Similarly, "C:\\Users\\user1\\AppData\\Roaming\\Composer\\vendor\\drush\\drush\\drush" --backend=2 --verbose --debug --root="C:\\website\\drupal7" --uri=http://default pm-updatestatus 2>&1, which I extracted from the debug output of drush -d up (see below) also successfully runs.

What could I try?

The debug output is the following.

Calling hook drush_pm_updatecode_validate [11.27 sec, 17.04 MB]
Returned from hook drush_pm_updatecode_validate [11.27 sec, 17.04 MB] Calling hook drush_pm_updatecode [11.27 sec, 17.05 MB]
Cache MISS cid: 8.1.2-alias-path--59067c616e8e4f3b7078e0502d77bf35 [11.27 sec, 17.06 MB] Backend invoke:
"C:\Users\user1\AppData\Roaming\Composer\vendor\drush\drush\drush" --backend=2 --verbose --debug --root="C:\website\drupal7" --uri=http://default pm-updatestatus 2>&1 [11.61 sec, 17.09 MB] "C:\Users\user1\AppData\Roaming\Composer\vendor\drush\drush\drush" --backend=2 --verbose --debug --root="C:\website\drupal7" --uri=http://default pm-updatestatus 2>&1 [11.61 sec, 17.09 MB] The command could not be executed successfully (returned: The filename, directory name, or volume label syntax is incorrect., code: 1) [11.79 sec, 17.09 MB] pm-updatestatus failed. [11.79 sec, 17.08 MB]

I am using Drush 8.1.2, Drupal 7.50 running on Windows 7, PHP 5.6.23, and Apache 2.4.23.

1

I was able to fix the problem by editing the file /path/to/drush/includes/exec.inc and changing line 331 from

return _drush_escapeshellarg_windows($arg, $raw);

to

return _drush_escapeshellarg_windows($arg, TRUE);

as described by peterromero here https://github.com/drush-ops/drush/issues/2152

1

My issue went away when I unlinked my PHP@5.6 and linked PHP@7.2 that MAMP is using. Then I run source ~/.bash_profile (didn't need to reload Terminal).Restarted apache.

0

In my case I was getting a Drupal error

Error: Call to undefined function Drush\UpdateService\simplexml_load_file() in                 Drush\UpdateService\Project::getInstance() (line 74 of phar:///usr/local/bin/drush/vendor/composer/../../lib/

which indicated that the php-xml extension was not installed.

sudo aptitude install php7.2-xml

fixed the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.