Skip to content

Commit

Permalink
Ensuring that drush policy applies only to AC. (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash authored Nov 18, 2016
1 parent 71c4745 commit 138fc0c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion template/drush/policy.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
* Alter alias record data in code.
*/
function policy_drush_sitealias_alter(&$alias_record) {
if ($alias_record['path-aliases']['%drush-script'] == 'drush9') {
if (!empty($alias_record['uri'])
&& strstr($alias_record['uri'], 'acquia') !== FALSE
&& !empty($alias_record['path-aliases']['%drush-script'])
&& $alias_record['path-aliases']['%drush-script'] == 'drush9') {
// Acquia Cloud does not currently support drush9.
$alias_record['path-aliases']['%drush-script'] = 'drush8';
}
Expand Down

0 comments on commit 138fc0c

Please sign in to comment.