require_once $path;
}
// Bootstrap file must be required directly rather than from function
// invocation to preserve any loaded globals
$bootstrap = $console->options['bootstrap'];
if ($bootstrap) {
if (!file_exists($bootstrap)) {
$console->writeLn("Bootstrap file not found: {$bootstrap}");
exit(1);
} else {
if (!is_readable($bootstrap)) {
$console->writeLn("Bootstrap file not readable: {$bootstrap}");
exit(1);
} else {
if (!@(include_once $bootstrap)) {
$console->writeLn("Unable to include bootstrap: {$bootstrap}");
exit(1);
}
}
}
}
// Files must be required directly rather than from function
// invocation to preserve any loaded globals
$paths = expandPaths($console->getPaths());
foreach ($paths as $path) {
require_once $path;
}
// Start the runner
Runner::$console = $console;
Runner::getInstance()->run();
exit($console->getExitStatus());