Closed (fixed)
Project:
Drush
Version:
All-versions-3.0
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Jun 2010 at 00:15 UTC
Updated:
27 Jul 2011 at 23:59 UTC
I have a module similar to require_login that causes drush to fail. E.g., the cookies/header can't be written errors occur.
I've tried the tricks listed for the securepages module, but that seems to only change a variable setting and does not really disable the module.
Is there a way to tell Drush to not include a specific module in it's bootstrap process without changing the website/db settings? E.g., ignore login requirement for command line items but still enforce it on the website?
Seems like there should be a way to do this in the drupalrc but I can't find any docs/examples.
TIA
Comments
Comment #1
moshe weitzman commentednot possible yet in core drupal. help welcome at #625444: Override enabled module/theme list dynamically using variable override in settings.php
Comment #2
cgmonroe commentedThanks. I had a suspicion that might be the case.
Just in case anyone else needs a work around. Here's what I did:
I found that the culprit in my mod was a drupal_goto call. So I added a bit of code at the top of the hook using this that looked like:
Then I created a drupalrc.ini in my sites/default directory that had the lines:
Now drush runs and the site's still secure. Well.. not if someone can set this variable via the web... but if they can do that my security's compromised anyway....
Comment #4
xjmFor securepages/drush compatibility, see also #599948: conflict with drush (headers already sent).
Comment #5
greg.1.anderson commentedIt might be better to check for drush via
function_exists('drush_main'); then you would not need the override.