Closed (fixed)
Project:
Drush
Version:
7.x-4.5
Component:
Base system (internal API)
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
1 May 2012 at 21:44 UTC
Updated:
28 Sep 2012 at 14:23 UTC
Hi,
I defined an alias for a site in /etc/drush/xxxxxxx.alias.drushrc.php like this
$aliases['dev'] = array(
'uri' => 'dev.xxxxxxxx.org',
'root' => '/home/vhosts/xxxxxx/dev',
);
It seems to work
>drush sa
@dev
But when I try to get the status or other instructions it fails
>drush @dev status
The drush command '@dev status' could not be found.Anyone can help me configuring aliases, please?
Thank you.
Comments
Comment #0.0
Thithi32 commentedJust modifying for privacy purpose
Comment #1
Thithi32 commentedComment #2
greg.1.anderson commentedRun with --debug, perhaps? Everything in #0 looks okay.
Comment #3
Thithi32 commentedWhen I run the command "drush @dev status --debug" in the site root folder it gives me:
Outside the root folder the answer is
The answer seems somewhere else ....
Comment #4
Thithi32 commentedWhen I execute " drush --root=/home/vhosts/xxxxxxxx/dev --uri=dev.xxxxxx.org status" it gives me the correct answer ....
Comment #5
greg.1.anderson commentedYour symptoms are similar to #1551574: Alias loaded but not used (Windows 7) -- SOLVED (syntax), but we can't blame Windows paths or the path-alias setting here.
What does
drush sa @devproduce? How aboutdrush sa @xxxxxx(where xxxxx comes from the redacted portion of /etc/drush/xxxxxxx.alias.drushrc.php)?Comment #6
greg.1.anderson commentedThe debug message "Load @dev" actually means "Searching for @dev". This is deceptive, and should be changed.
Reviewing your original report, I see that your problem is that your alias file cannot be found, because it is misnamed. You stored your alias in the file /etc/drush/xxxxxxx.alias.drushrc.php, which will ONLY work if xxxxxxx is "dev". This is because the filename pattern ".alias.drushrc.php" is for storing a single named alias. If your alias file stores multiple aliases, use /etc/drush/xxxxxxx.aliases.drushrc.php instead.
Comment #7
Thithi32 commentedRight on target! Thank you very much Greg. I knew it was something like that, but I couldn't find it.
Thumbs up!
Comment #9
ifernando commentedIt works for me after noticing that the file name should be
aliases.drushrc.php.Comment #9.0
ifernando commentedJust modifying for privacy purpose