Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / drush / drush / src / Commands / core / SiteCommands.php
index c859a72996d632397f9ba7d810b992a31d9ec460..4abf0726a219f4f855a1fb8cf88ee6d9cc43a28b 100644 (file)
@@ -4,9 +4,9 @@ namespace Drush\Commands\core;
 use Drush\Commands\DrushCommands;
 use Drush\Drush;
 use Drush\SiteAlias\LegacyAliasConverter;
-use Drush\SiteAlias\SiteAliasFileDiscovery;
-use Drush\SiteAlias\SiteAliasManagerAwareInterface;
-use Drush\SiteAlias\SiteAliasManagerAwareTrait;
+use Consolidation\SiteAlias\SiteAliasFileDiscovery;
+use Consolidation\SiteAlias\SiteAliasManagerAwareInterface;
+use Consolidation\SiteAlias\SiteAliasManagerAwareTrait;
 use Consolidation\OutputFormatters\StructuredData\ListDataFromKeys;
 use Drush\Utils\StringUtils;
 use Symfony\Component\Console\Input\Input;
@@ -110,17 +110,15 @@ class SiteCommands extends DrushCommands implements SiteAliasManagerAwareInterfa
      *   List all alias records known to drush.
      * @usage drush site:alias @dev
      *   Print an alias record for the alias 'dev'.
-     * @usage drush @none site-alias
-     *   Print only actual aliases; omit multisites from the local Drupal installation.
      * @topics docs:aliases
      *
      */
     public function siteAlias($site = null, $options = ['format' => 'yaml'])
     {
-        // Check to see if the user provided a specification that matches
+        // First check to see if the user provided a specification that matches
         // multiple sites.
         $aliasList = $this->siteAliasManager()->getMultiple($site);
-        if (is_array($aliasList)) {
+        if (is_array($aliasList) && !empty($aliasList)) {
             return new ListDataFromKeys($this->siteAliasExportList($aliasList, $options));
         }