0

I'm working locally on my OSX and I have my drush alias files at ~/.drush/[hostname].aliases.drushrpc.php but no matter what project I'm in, only one of the alias files are being read, as confirmed through drush status. Also of note is that my main drushrpc.php file was never in that directory and I don't think it is anywhere.

I've tried clearing drush cache, and also adding a drushrpc.php and adding this php which I'm not entirely sure what it means:

<?php
// ~/.drush/drushrc.php
exec('git rev-parse --show-toplevel 2> /dev/null', $repo);
if (!empty($repo)) {
  $repo = array_shift($repo);
  $options['config'] = $repo . '/.drush/drushrc.php';
  $options['include'] = $repo . '/.drush/commands';
  $options['alias-path'] = $repo . '/.drush';
}

I found that configuration here: http://www.astonishdesign.com/blog/drush-aliases-what-why-and-how

Anyone know how I should proceed?

3
  • Have you used drush "@self" command? Like drush "@self" dl views. Use without the quotes. Jul 13, 2014 at 18:23
  • @self can be accessed. But my other [hostname].aliases.drushrpc.php files cannot be found in drush status
    – AlxVallejo
    Jul 13, 2014 at 19:16
  • Are you sure the file is [hostname].aliases.drushrpc.php and not [hostname].aliases.drushrc.php?
    – apaderno
    Jul 14, 2014 at 0:01

1 Answer 1

2

I have my drush alias files at ~/.drush/[hostname].aliases.drushrpc.php
[…]
But my other [hostname].aliases.drushrpc.php files cannot be found in drush status

The filename should be ~/.drush/[hostname].aliases.drushrc.php. not [hostname].aliases.drushrpc.php: Your filename contains an extra p. See example.aliases.drushrc.php.

1
  • Yup, that was it!
    – AlxVallejo
    Jul 16, 2014 at 15:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.