/**
  * {@inheritdoc}
  */
 public function start(Project $project)
 {
     try {
         $this->doctor->examine(new NullOutput(), true);
     } catch (CommandFailedException $e) {
         if (!$this->userInteraction instanceof ConsoleUserInteraction) {
             throw $e;
         }
         $answer = $this->userInteraction->ask(new Question('It looks like there\'s something wrong with your installation. Would you like to run the `doctor` command ? [Yn]', 'y'));
         if ('y' == strtolower($answer)) {
             $this->doctor->examine($this->userInteraction->getOutput(), false);
         }
     }
     return $this->projectManager->start($project);
 }
Exemplo n.º 2
0
 /**
  * @return string
  */
 protected function promptForPackageName()
 {
     $defaultPhpVersion = $this->guessSsh2PhpPackage();
     $question = new Question(sprintf('Which homebrew package do you want to install (default "%s") ? ("n" for nothing)', $defaultPhpVersion), $defaultPhpVersion);
     $package = $this->userInteraction->ask($question);
     return $package;
 }