Skip to content

Commit

Permalink
Merge pull request #23 from rplansky/bugfix/stop-on-error
Browse files Browse the repository at this point in the history
Fixed dployer to stop on errors
  • Loading branch information
Zizaco committed Oct 7, 2015
2 parents 91386e9 + d5b4ab4 commit f23be2d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions app/Dployer/Event/ScriptRunner.php
Expand Up @@ -128,13 +128,15 @@ protected function execute($script, OutputInterface $output)
false
);

$isForce = ($this->stopOnError && false === $this->interactive);
$confirmAbort = ($this->interactive &&
false === $this->helper->ask($this->input, $output, $question)
);
if ($error) {
$stopOnError = ($this->stopOnError && false === $this->interactive);
$confirmAbort = ($this->interactive &&
false === $this->helper->ask($this->input, $output, $question)
);

if ($error && ($isForce || $confirmAbort)) {
throw new ScriptErrorException();
if ($stopOnError || $confirmAbort) {
throw new ScriptErrorException();
}
}

return true;
Expand Down
2 changes: 1 addition & 1 deletion app/bootstrap.php
Expand Up @@ -10,7 +10,7 @@

// Bind the Symfony Console application
$app->bind('console', function () {
return new Symfony\Component\Console\Application('Dployment', '0.1 BETA');
return new Symfony\Component\Console\Application('dployer', '1.2.1');
}, true);

function app()
Expand Down
Binary file modified dployer
Binary file not shown.

0 comments on commit f23be2d

Please sign in to comment.