Closed (fixed)
Project:
Drush
Component:
Interoperability
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Nov 2009 at 18:35 UTC
Updated:
30 Jan 2010 at 16:37 UTC
Jump to comment: Most recent file
This is a followup to the issue #586466: Drush.php is no longer directly executable (can interfere with backend invoke). It's a different problem that affects both 2.1 and HEAD. It is because we assume that $_ is a PHP variable that means "the php executable". That is wrong: it's a bash-specific variable that is quite unreliable that generally means "the last command executed".
I suggest we completely drop the $_ parsing, I have started working on a patch to do just that. We should assume that in the general case, "php" is in the path and will just work (which means that we can invoke $argv0 directly, in most cases).
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 637574_dash.patch | 5.68 KB | anarcat |
| #5 | 637574_dash.patch | 5.92 KB | anarcat |
| #4 | 637574_dash.patch | 5.3 KB | anarcat |
| #1 | 637574_dash.patch | 5.3 KB | anarcat |
Comments
Comment #1
anarcat commentedHere's a patch that brings back --php to deal with particular cases. In general, we assume php is in the path and executable.
Comment #2
moshe weitzman commentedI am getting an immediate error:
Fatal error: Call to undefined function drush_get_option() in /Users/mw/contributions/modules/drush/includes/environment.inc on line 953
Comment #3
anarcat commentedHum, you're right, the patch is missing a chunk where the include order is modified in drush.php. I'll send this in on monday, sorry!
Comment #4
anarcat commentedHere's a more adequate patch.
Comment #5
anarcat commentedGeez, I uploaded the exact same patch... Here's a proper one, *again*. Sorry for the trouble.
Comment #6
moshe weitzman commenteddefine('DRUSH_COMMAND', drush_find_drush()) now appears twice in environment.inc. The one in global scope is not needed, right?
Comment #7
anarcat commentedsorry about this again, I think that was the original idea: that the bootstrap code initialise the variable, so we don't need to reorder the includes.
Here's a new patch, again. I can't believe I fail at providing a so simple thing. :)
Comment #8
moshe weitzman commentedCommitted. Thanks much.
Comment #10
macmladen commentedIt is still not working, please look at this thred #662926: --php path argument required on Dreamhost and maybe unite threads as they talk about same thing. (I think).
Comment #11
anarcat commentedPlease do not reopen old issues especially when there's a new one that's been opened, unless the other one is marked as duplicate.
We have enough issues in the queue without reopening fixed ones. :P