X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrush%2Fdrush%2Fsrc%2FPsysh%2FDrushCommand.php;fp=vendor%2Fdrush%2Fdrush%2Fsrc%2FPsysh%2FDrushCommand.php;h=30bf569bd010a08957a9406f090a3a12d403f52b;hp=4172f5d9cd826ec32c8a909ef9123c7779b658b1;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/vendor/drush/drush/src/Psysh/DrushCommand.php b/vendor/drush/drush/src/Psysh/DrushCommand.php index 4172f5d9c..30bf569bd 100644 --- a/vendor/drush/drush/src/Psysh/DrushCommand.php +++ b/vendor/drush/drush/src/Psysh/DrushCommand.php @@ -43,7 +43,7 @@ class DrushCommand extends BaseCommand */ public function getNamespace() { - $parts = explode('-', $this->getName()); + $parts = explode(':', $this->getName()); return count($parts) >= 2 ? array_shift($parts) : 'global'; } @@ -53,11 +53,11 @@ class DrushCommand extends BaseCommand protected function configure() { $this - ->setName($this->command->getName()) - ->setAliases($this->command->getAliases()) - ->setDefinition($this->command->getDefinition()) - ->setDescription($this->command->getDescription()) - ->setHelp($this->buildHelpFromCommand()); + ->setName($this->command->getName()) + ->setAliases($this->command->getAliases()) + ->setDefinition($this->command->getDefinition()) + ->setDescription($this->command->getDescription()) + ->setHelp($this->buildHelpFromCommand()); } /** @@ -73,20 +73,20 @@ class DrushCommand extends BaseCommand if (strpos($first, '@') === 0) { $alias = $first; $command = array_shift($args); - } // Otherwise, default the alias to '@self' and use the first argument as the - // command. - else { + } else { + // Otherwise, default the alias to '@self' and use the first argument as the + // command. $alias = '@self'; $command = $first; } - $options = $input->getOptions(); + $options = array_diff_assoc($input->getOptions(), $this->getDefinition()->getOptionDefaults()); // Force the 'backend' option to TRUE. $options['backend'] = true; $return = drush_invoke_process($alias, $command, array_values($args), $options, ['interactive' => true]); - if ($return['error_status'] > 0) { + if (($return['error_status'] > 0) && !empty($return['error_log'])) { foreach ($return['error_log'] as $error_type => $errors) { $output->write($errors); }