@@ -43,7 +43,7 @@ public function __construct(AnnotatedCommand $command)
4343 */
4444 public function getNamespace ()
4545 {
46- $ parts = explode ('- ' , $ this ->getName ());
46+ $ parts = explode (': ' , $ this ->getName ());
4747 return count ($ parts ) >= 2 ? array_shift ($ parts ) : 'global ' ;
4848 }
4949
@@ -53,11 +53,11 @@ public function getNamespace()
5353 protected function configure ()
5454 {
5555 $ this
56- ->setName ($ this ->command ->getName ())
57- ->setAliases ($ this ->command ->getAliases ())
58- ->setDefinition ($ this ->command ->getDefinition ())
59- ->setDescription ($ this ->command ->getDescription ())
60- ->setHelp ($ this ->buildHelpFromCommand ());
56+ ->setName ($ this ->command ->getName ())
57+ ->setAliases ($ this ->command ->getAliases ())
58+ ->setDefinition ($ this ->command ->getDefinition ())
59+ ->setDescription ($ this ->command ->getDescription ())
60+ ->setHelp ($ this ->buildHelpFromCommand ());
6161 }
6262
6363 /**
@@ -73,20 +73,20 @@ protected function execute(InputInterface $input, OutputInterface $output)
7373 if (strpos ($ first , '@ ' ) === 0 ) {
7474 $ alias = $ first ;
7575 $ command = array_shift ($ args );
76- } // Otherwise, default the alias to '@self' and use the first argument as the
77- // command.
78- else {
76+ } else {
77+ // Otherwise, default the alias to '@self' and use the first argument as the
78+ // command.
7979 $ alias = '@self ' ;
8080 $ command = $ first ;
8181 }
8282
83- $ options = $ input ->getOptions ();
83+ $ options = array_diff_assoc ( $ input ->getOptions (), $ this -> getDefinition ()-> getOptionDefaults () );
8484 // Force the 'backend' option to TRUE.
8585 $ options ['backend ' ] = true ;
8686
8787 $ return = drush_invoke_process ($ alias , $ command , array_values ($ args ), $ options , ['interactive ' => true ]);
8888
89- if ($ return ['error_status ' ] > 0 ) {
89+ if (( $ return ['error_status ' ] > 0 ) && ! empty ( $ return [ ' error_log ' ]) ) {
9090 foreach ($ return ['error_log ' ] as $ error_type => $ errors ) {
9191 $ output ->write ($ errors );
9292 }
0 commit comments