how to detect drush is being run?

joachim - August 13, 2009 - 22:53
Project:Drush
Version:All-Versions-2.0
Component:Interoperability
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I've just created this module: http://drupal.org/project/holding
and I've found that running drush on my site that runs it shows me the holding page...
So I'd like to add an exception to my module.

What's the simplest way to detect whether Drupal is being run by Drush?

#1

dman - August 13, 2009 - 23:00

Among other things, the $_SERVER and $_REQUEST is going to look totally different. Is that a start?
print_r() it and you'll see something you can grab.

#2

moshe weitzman - October 31, 2009 - 04:09
Status:active» fixed

#3

System Message - November 14, 2009 - 04:10
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.