From 72d84c94f636184006ff827c69841b45295825ea Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Sun, 10 Jul 2016 14:13:59 +0600 Subject: [PATCH] Fixed PHPCI_DEBUG_MODE (Additional info in build log) for phpci:run-builds --- src/PHPCI/Command/RunCommand.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/PHPCI/Command/RunCommand.php b/src/PHPCI/Command/RunCommand.php index 5e6533dd..0e193e33 100644 --- a/src/PHPCI/Command/RunCommand.php +++ b/src/PHPCI/Command/RunCommand.php @@ -65,7 +65,8 @@ class RunCommand extends Command { $this ->setName('phpci:run-builds') - ->setDescription(Lang::get('run_all_pending')); + ->setDescription(Lang::get('run_all_pending')) + ->addOption('debug', null, null, 'Run PHPCI in Debug Mode'); } /** @@ -83,6 +84,12 @@ class RunCommand extends Command ); } + // Allow PHPCI to run in "debug mode" + if ($input->hasOption('debug') && $input->getOption('debug')) { + $output->writeln('Debug mode enabled.'); + define('PHPCI_DEBUG_MODE', true); + } + $running = $this->validateRunningBuilds(); $this->logger->pushProcessor(new LoggedBuildContextTidier());