From 23c2c09a3dbeed215e1b400eda9dc8c361bdd5b7 Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Fri, 18 Nov 2016 10:14:56 -0500 Subject: [PATCH] Ensuring that drush policy applies only to AC. --- template/drush/policy.drush.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/template/drush/policy.drush.inc b/template/drush/policy.drush.inc index abc8e34eb..b42599779 100644 --- a/template/drush/policy.drush.inc +++ b/template/drush/policy.drush.inc @@ -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'; }