Closed (fixed)
Project:
Drush
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Nov 2008 at 01:18 UTC
Updated:
5 Dec 2008 at 22:31 UTC
I have noticed that many users have trouble running drush because (a) it doesn't figure out their Drupal root and uri correctly, especially if they use symlinks and (b) it doesn't have helpful error messages when these are missing.
This patch attempts to resolve this by:
| Comment | File | Size | Author |
|---|---|---|---|
| drush_php_intelligence.patch | 7.42 KB | owen barton |
Comments
Comment #1
moshe weitzman commentedI tested this and nothing broke. I use subdirectories for all my dev sites so I could not test the autodetect stuff. Anyway, please commit along with a HEAD version. Thanks Grugnog2.
Comment #2
vingborg commentedAutodetection works like a charm on my *nix system on several D6 installations with multisite setups.
Comment #3
owen barton commentedCommitted this yesterday
Comment #4
vingborg commentedThere is a slight flaw in the $base_url auto-detection logic: At some point it actually does a require_once() on the settings.php file, which will crash if you happen to have any logic in there that depends on the real Drupal bootstrap sequence. Take a look at custom_url_rewrite_inbound() and related "hooks", for instance.
If "settings.php" was loaded as a string instead, a fairly simple preg_match could extract the value of $base_url.
The vast majority of Drupal/drush users will never notice this, so it's not of paramount importance.