From 69d05d6da8ac9497c02de4a600075db1c9616ed3 Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Fri, 20 Feb 2015 12:46:43 +0000 Subject: [PATCH] Setup plugin failure should cease execution. Fixes #797 --- PHPCI/Plugin/Util/Executor.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PHPCI/Plugin/Util/Executor.php b/PHPCI/Plugin/Util/Executor.php index bbc9507c..8782e231 100644 --- a/PHPCI/Plugin/Util/Executor.php +++ b/PHPCI/Plugin/Util/Executor.php @@ -60,6 +60,11 @@ class Executor $this->logger->logSuccess(Lang::get('plugin_success')); } else { + // If we're in the "setup" stage, execution should not continue after + // a plugin has failed: + if ($stage == 'setup') { + throw new \Exception('Plugin failed: ' . $plugin); + } // If we're in the "test" stage and the plugin is not allowed to fail, // then mark the build as failed: