mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-04 07:15:38 +08:00
@@ -80,7 +80,7 @@ abstract class BaseCommand extends Command
|
||||
$this->output = $output;
|
||||
|
||||
global $ob_logger;
|
||||
if ($input->getOption('debug')) {
|
||||
if ($input->getOption('debug') || $output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL) {
|
||||
$ob_logger = new ConsoleLogger(LogLevel::DEBUG, decorated: !$input->getOption('no-ansi'));
|
||||
define('DEBUG_MODE', true);
|
||||
} else {
|
||||
|
||||
@@ -537,10 +537,10 @@ class Downloader
|
||||
}
|
||||
f_exec($cmd, $output, $ret);
|
||||
if ($ret === 2 || $ret === -1073741510) {
|
||||
throw new RuntimeException('failed http fetch');
|
||||
throw new RuntimeException(sprintf('Failed to fetch "%s"', $url));
|
||||
}
|
||||
if ($ret !== 0) {
|
||||
throw new DownloaderException('failed http fetch');
|
||||
throw new DownloaderException(sprintf('Failed to fetch "%s"', $url));
|
||||
}
|
||||
$cache[$cmd]['cache'] = implode("\n", $output);
|
||||
$cache[$cmd]['expire'] = time() + 3600;
|
||||
@@ -549,10 +549,10 @@ class Downloader
|
||||
}
|
||||
f_exec($cmd, $output, $ret);
|
||||
if ($ret === 2 || $ret === -1073741510) {
|
||||
throw new RuntimeException('failed http fetch');
|
||||
throw new RuntimeException(sprintf('Failed to fetch "%s"', $url));
|
||||
}
|
||||
if ($ret !== 0) {
|
||||
throw new DownloaderException('failed http fetch');
|
||||
throw new DownloaderException(sprintf('Failed to fetch "%s"', $url));
|
||||
}
|
||||
return implode("\n", $output);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user