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'; }