{"action":"created","issue":{"url":"https://api.github.com/repos/drush-ops/drush/issues/1532","labels_url":"https://api.github.com/repos/drush-ops/drush/issues/1532/labels{/name}","comments_url":"https://api.github.com/repos/drush-ops/drush/issues/1532/comments","events_url":"https://api.github.com/repos/drush-ops/drush/issues/1532/events","html_url":"https://github.com/drush-ops/drush/issues/1532","id":98873074,"number":1532,"title":"Drush site-set fails for aliases in site specific locations (e.g. sites/all/drush)","user":{"login":"alex-mccabe","id":4119230,"avatar_url":"https://avatars.githubusercontent.com/u/4119230?v=3","gravatar_id":"","url":"https://api.github.com/users/alex-mccabe","html_url":"https://github.com/alex-mccabe","followers_url":"https://api.github.com/users/alex-mccabe/followers","following_url":"https://api.github.com/users/alex-mccabe/following{/other_user}","gists_url":"https://api.github.com/users/alex-mccabe/gists{/gist_id}","starred_url":"https://api.github.com/users/alex-mccabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex-mccabe/subscriptions","organizations_url":"https://api.github.com/users/alex-mccabe/orgs","repos_url":"https://api.github.com/users/alex-mccabe/repos","events_url":"https://api.github.com/users/alex-mccabe/events{/privacy}","received_events_url":"https://api.github.com/users/alex-mccabe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/drush-ops/drush/labels/area-preflight","name":"area-preflight","color":"d4c5f9"},{"url":"https://api.github.com/repos/drush-ops/drush/labels/type-bug","name":"type-bug","color":"f7c6c7"}],"state":"open","locked":false,"assignee":{"login":"greg-1-anderson","id":612191,"avatar_url":"https://avatars.githubusercontent.com/u/612191?v=3","gravatar_id":"","url":"https://api.github.com/users/greg-1-anderson","html_url":"https://github.com/greg-1-anderson","followers_url":"https://api.github.com/users/greg-1-anderson/followers","following_url":"https://api.github.com/users/greg-1-anderson/following{/other_user}","gists_url":"https://api.github.com/users/greg-1-anderson/gists{/gist_id}","starred_url":"https://api.github.com/users/greg-1-anderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greg-1-anderson/subscriptions","organizations_url":"https://api.github.com/users/greg-1-anderson/orgs","repos_url":"https://api.github.com/users/greg-1-anderson/repos","events_url":"https://api.github.com/users/greg-1-anderson/events{/privacy}","received_events_url":"https://api.github.com/users/greg-1-anderson/received_events","type":"User","site_admin":false},"milestone":null,"comments":18,"created_at":"2015-08-04T01:59:43Z","updated_at":"2016-01-08T16:49:57Z","closed_at":null,"body":"#1241 may or may not be related, I'm not sure. In that issue aliases stopped working entirely, in here they only stop working with site-set, but in both cases it breaks at 7.0.0-alpha4 - alpha3 works fine.\r\n\r\nRunning a command with an explicit alias works:\r\n\r\n`$ drush @mysite.local en -y devel`\r\n`devel is already enabled.                                                                                                                                                                                                  [ok]`\r\n`There were no extensions that could be enabled.                                                                                                                                                                            [ok]`\r\n\r\nRunning site-set (or the alias, use) and then the command without the alias fails:\r\n\r\n`$ drush use @mysite.local`\r\n`$ drush en -y devel`\r\n`Command pm-enable needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.                                                              [error]`\r\n`The drush command 'en devel' could not be executed.                                                                                                                                                                 [error]`\r\n`Could not find a Drupal settings.php file at sites/default/settings.php.                                                                                                                                            [error]`\r\n\r\nThe alias is for a local development site that has its own settings.php in its own directory, `mysite.local/settings.php`. I'm on Ubuntu 14.04 LTS, Drupal 7.38, running PHP 5.5.9-1ubuntu4.11."},"comment":{"url":"https://api.github.com/repos/drush-ops/drush/issues/comments/170052910","html_url":"https://github.com/drush-ops/drush/issues/1532#issuecomment-170052910","issue_url":"https://api.github.com/repos/drush-ops/drush/issues/1532","id":170052910,"user":{"login":"greg-1-anderson","id":612191,"avatar_url":"https://avatars.githubusercontent.com/u/612191?v=3","gravatar_id":"","url":"https://api.github.com/users/greg-1-anderson","html_url":"https://github.com/greg-1-anderson","followers_url":"https://api.github.com/users/greg-1-anderson/followers","following_url":"https://api.github.com/users/greg-1-anderson/following{/other_user}","gists_url":"https://api.github.com/users/greg-1-anderson/gists{/gist_id}","starred_url":"https://api.github.com/users/greg-1-anderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greg-1-anderson/subscriptions","organizations_url":"https://api.github.com/users/greg-1-anderson/orgs","repos_url":"https://api.github.com/users/greg-1-anderson/repos","events_url":"https://api.github.com/users/greg-1-anderson/events{/privacy}","received_events_url":"https://api.github.com/users/greg-1-anderson/received_events","type":"User","site_admin":false},"created_at":"2016-01-08T16:49:57Z","updated_at":"2016-01-08T16:49:57Z","body":"Unless I am mistaken, the `drush.finder` should work just fine if the global and/or site-local Drush are a phar.  The only thing you lose in a phar are the features of the `drush` bash script, which includes selection of the php executable, php.ini management, et. al.\r\n\r\nUsing the `drush.wrapper`, the aliases stored in your site are only visible to Drush if said site is selected by the drush.finder, e.g. via cwd site selection. The drush wrapper can be committed to your site's repository, so alias sharing in teams is supported. However, I don't think that we can remove site-local alias support, because the `drush.wrapper` technique also depends on the fix in #1902 to support `use` with a site-local alias.  Specifying the location of your alias files via `drush.wrapper` is equivalent to using the default location vis-a-vis behavior of site-local aliases.\r\n\r\nMaybe I need to give up, and learn to love the site-local alias. My workflow is to live with the cumbersome `site-aliases` list that comes with pure global alias management strategy. This workflow is not feasible if you have hundreds of sites, and is inconvenient if you are a member of multiple teams.\r\n\r\nFor the record, the thing I hate the most about site-local aliases is the need to re-run the same bootstrap phases multiple times. In the current code, this wart is isolated to [one block at the end of drush_preflight()](https://github.com/drush-ops/drush/blob/8bcabc9ab324bbeebc6e9e65b45afc92ccf48f05/includes/preflight.inc#L275), and another location where we force a call to drush_invoke_process if it looks like we're about to get into trouble (i.e. if someone uses a site-local alias that points to a different Drupal site on the same machine). If we run drush_preflight_root() and / or drush_preflight_site() twice (as we do in the code referenced above), we run the risk of blowing up when we load the second site's autoload file. This hasn't been a practical problem since we separated the bootstrap from the preflight (in Drush 5, I think).\r\n\r\nSo, perhaps we're okay, with just a bit of ugly code that we need to live with."}}