Often, the return valud from drush_op('system', ...) is not checked at all, but when it is, drush is a little bit inconsistent about whether it expects the result to be 0 or FALSE or the textual output of the command that was just executed. The last is what system really returns, but drush was pretty consistent in expecting 0 to be success, or at least !== FALSE to be success.
Since this is wrong and pervasive, I thought that the best way to fix it was to introduce a new function drush_op_system that throws away the output and returns the result of the shell function, as drush expects drush_op to do (but which is impossible for 'system').
(Originally posted in #985716: site install 6 on windows, but these two issues are actually unrelated.)
| Comment | File | Size | Author |
|---|---|---|---|
| drush-op-system.patch | 9.07 KB | greg.1.anderson |
Comments
Comment #1
moshe weitzman commentedI like this a lot.
After that, RTBC.
Comment #2
greg.1.anderson commentedYes, $interactive is still used, and drush_op does have text for what it is used for. These items are not clear in the patch, but are visible in the source.
Committed.
Comment #3
greg.1.anderson commentedAccidentally broke drush_shell_exec in #0. Fixed in http://drupal.org/cvs?commit=461412