Closed (fixed)
Project:
Drush
Component:
Base system (internal API)
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Mar 2011 at 19:01 UTC
Updated:
9 Apr 2011 at 09:11 UTC
Jump to comment: Most recent file
A bit the same way we ignore drushrc files we can't open, we should do the same with aliases, with a little twist: I believe we shouldn't give a warning at all. There can be many different aliases all over the place, some may be in your search path, but maybe you shouldn't have access to them, and rightly so. You don't want to be harrassed by drush warning you that you can't open them.
Right now I have this phenomenon:
anarcat@marcos:provisionacl$ env HOME=/var/aegir drush @test.orangeseeds.org status
include(/home/aegir/.drush/server_localhost.alias.drushrc.php): failed to open stream: Permission denied [warning]
sitealias.inc:433
include(): Failed opening '/var/aegir/.drush/server_localhost.alias.drushrc.php' for inclusion [warning]
(include_path='.:/usr/share/php:/usr/share/pear') sitealias.inc:433
At least if we had only one warning, things would be better. :)
I propose that we just silently skip such aliases, for my sanity.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 0001-1104450-do-not-warn-about-aliases-we-can-t-open.patch | 1.13 KB | anarcat |
| #1 | 0001-1104450-do-not-warn-about-aliases-we-can-t-open.patch | 1.01 KB | anarcat |
Comments
Comment #1
anarcat commentedPatch is attached. I can push this to master whenever you guys want.
Could this be merged in 4.x too? ;)
Comment #2
moshe weitzman commentedI think a drush_log('cannot open foo', 'warning') would be about right. I could do 'debug' if others prefer that.
Comment #3
anarcat commentedDone with bootstrap.
Comment #4
msonnabaum commentedI'm good with #3.
Comment #5
greg.1.anderson commentedLooks good to me.
Comment #6
msonnabaum commentedCommitted to master/4.x.