Skip to content

Commit

Permalink
Fix #2379. Canonicalize root in site alias record.
Browse files Browse the repository at this point in the history
  • Loading branch information
weitzman committed Oct 7, 2016
1 parent 2f0c9fa commit e1094f8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions includes/sitealias.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/

use Drush\Log\LogLevel;
use Webmozart\PathUtil\Path;

/**
* Check to see if the user specified an alias
Expand Down Expand Up @@ -1259,6 +1260,12 @@ function _drush_sitealias_add_static_defaults(&$alias_record) {
if (isset($alias_record['db-url']) && !isset($alias_record['databases'])) {
$alias_record['databases'] = drush_sitealias_convert_db_from_db_url($alias_record['db-url']);
}

// Canonicalize paths.
if (!empty($alias_record['root'])) {
$alias_record['root'] = Path::canonicalize($alias_record['root']);
}

// Adjustments for aliases to drupal instances (as opposed to aliases that are site lists)
if (array_key_exists('uri', $alias_record)) {
// Make sure that there is always a 'path-aliases' array
Expand Down

0 comments on commit e1094f8

Please sign in to comment.