Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

when I do "drush sa" in terminal I get :

$ drush site-alias --short
@site-drupal
@i3f
@kera
@none

But, when I do it in a php script

passthru("/usr/local/bin/drush sa --short");

I get only

@none @self 

If I omit --short, I get the URIs of the missing aliases !

I just don't get it!

Path: Drush seems to not get access to drushrc aliases...

share|improve this question
I found the solution myself! In fact, drush needs to know the HOME path to access the drusrc aliases : system('HOME=/Users/<USERNAME> && export HOME && /usr/local/bin/drush sa --short '); – BitLegacy01 Dec 5 '12 at 11:15

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.