src/Robo/Common/Executor.php
public function drush($command) {
    // @todo Set to silent if verbosity is less than very verbose.
    $bin = $this->getConfigValue('composer.bin');
    /** @var \Robo\Common\ProcessExecutor $process_executor */
    $drush_alias = $this->getConfigValue('drush.alias');
    $command_string = "'$bin/drush' @$drush_alias $command";

    // URIs do not work on remote drush aliases in Drush 9. Instead, it is
    // expected that the alias define the uri in its configuration.
    if ($drush_alias != 'self') {
      $command_string .= ' --uri=' . $this->getConfigValue('site');
    }

    $process_executor = Robo::process(new Process($command_string));

    return $process_executor->dir($this->getConfigValue('docroot'))
      ->interactive(FALSE)
      ->printOutput(TRUE)
      ->printMetadata(TRUE)
      ->setVerbosityThreshold(VerbosityThresholdInterface::VERBOSITY_VERY_VERBOSE);
  }
public function drush($command) {
    // @todo Set to silent if verbosity is less than very verbose.
    $bin = $this->getConfigValue('composer.bin');
    /** @var \Robo\Common\ProcessExecutor $process_executor */
    $drush_alias = $this->getConfigValue('drush.alias');
    $command_string = "'$bin/drush' @$drush_alias $command";

    // URIs do not work on remote drush aliases in Drush 9. Instead, it is
    // expected that the alias define the uri in its configuration.
    if ($drush_alias != 'self') {
      $command_string .= ' --uri=' . $this->getConfigValue('site');
    }

    $process_executor = Robo::process(new Process($command_string));

    return $process_executor->dir($this->getConfigValue('docroot'))
      ->interactive(FALSE)
      ->printOutput(TRUE)
      ->printMetadata(TRUE)
      ->setVerbosityThreshold(VerbosityThresholdInterface::VERBOSITY_VERY_VERBOSE);
  }
public function drush ( $ command ) { // @todo Set to silent if verbosity is less than very verbose. $ bin = $ this -> getConfigValue ( 'composer.bin' ) ; /** @var \Robo\Common\ProcessExecutor $process_executor */ $ drush_alias = $ this -> getConfigValue ( 'drush.alias' ) ; $ command_string = "'$bin/drush' @$drush_alias $command" ; // URIs do not work on remote drush aliases in Drush 9. Instead, it is // expected that the alias define the uri in its configuration. if ( $ drush_alias != 'self' ) { $ command_string .= ' --uri=' . $ this -> getConfigValue ( 'site' ) ; } $ process_executor = Robo :: process ( new Process ( $ command_string ) ) ; return $ process_executor -> dir ( $ this -> getConfigValue ( 'docroot' ) ) -> interactive ( FALSE ) -> printOutput ( TRUE ) -> printMetadata ( TRUE ) -> setVerbosityThreshold ( VerbosityThresholdInterface :: VERBOSITY_VERY_VERBOSE ) ; }
Executes a drush command.

@param string $command
The command to execute, without "drush" prefix.

@return \Robo\Common\ProcessExecutor
The unexecuted process.
Executes a drush command .