예제 #1
0
 function it_outputs_the_command_when_run_very_very_verbose(GrumPHP $config, ExternalCommand $externalCommandLocator, IOInterface $io)
 {
     $io->isVeryVerbose()->willReturn(true);
     $command = '/usr/bin/grumphp';
     $io->write(PHP_EOL . 'Command: ' . ProcessUtils::escapeArgument($command), true)->shouldBeCalled();
     $arguments = new ProcessArgumentsCollection([$command]);
     $process = $this->buildProcess($arguments);
 }
 /**
  * @return void
  */
 private function doPopStash()
 {
     if (!$this->stashIsApplied) {
         return;
     }
     try {
         $this->io->write('<fg=yellow>Reapplying unstaged changes from stash.</fg=yellow>');
         $this->repository->run('stash', array('pop', '--quiet'));
     } catch (Exception $e) {
         throw new RuntimeException('The stashed changes could not be applied. Please run `git stash pop` manually!' . 'More info: ' . $e->__toString(), 0, $e);
     }
     $this->stashIsApplied = false;
 }
예제 #3
0
 /**
  * @param Process $process
  */
 private function logProcessInVerboseMode(Process $process)
 {
     if ($this->io->isVeryVerbose()) {
         $this->io->write(PHP_EOL . 'Command: ' . $process->getCommandLine(), true);
     }
 }