When the command-line version of PHP isn't sufficient, we get a helpful error message. Unfortunately, it uses the wrong exit code, making it difficult to react to this failure mode:

# drush
Your command line PHP installation is too old. Drush requires at least PHP 5.3.5
# echo $?
#2 drush-1821888.patch1.25 KBjonhattan
#1 drush-1821888.patch686 bytesjonhattan


jonhattan’s picture

Status: Active » Needs review
686 bytes

Changed die() to drush_log() and exit(1). Perhaps drush_set_error() is preferable for remote calls ?

jonhattan’s picture

1.25 KB

A better approach.

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

Could you change the error message so that Drush is capitalized. It should only be lowercase when referring to the executable shell script and not the Drush project in general.

jonhattan’s picture

Status: Reviewed & tested by the community » Fixed


Status: Fixed » Closed (fixed)

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