Fixed PHPCI_DEBUG_MODE (Additional info in build log) for phpci:run-builds

This commit is contained in:
Dmitry Khomutov 2016-07-10 14:13:59 +06:00
parent 82e73281e4
commit 72d84c94f6

View file

@ -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('<comment>Debug mode enabled.</comment>');
define('PHPCI_DEBUG_MODE', true);
}
$running = $this->validateRunningBuilds();
$this->logger->pushProcessor(new LoggedBuildContextTidier());