Add private-mode option for server command

This commit is contained in:
crazywhalecc
2022-03-29 02:10:09 +08:00
committed by Jerry Ma
parent 42aac802dd
commit e8bd381907
2 changed files with 10 additions and 5 deletions

View File

@@ -144,9 +144,9 @@ class Framework
$this->server_set['log_level'] = SWOOLE_LOG_DEBUG;
$add_port = ZMConfig::get('global', 'remote_terminal')['status'] ?? false;
// if ($instant_mode) {
$this->loadServerEvents();
// }
if (!$instant_mode) {
$this->loadServerEvents();
}
$this->parseCliArgs(self::$argv, $add_port);
@@ -205,7 +205,9 @@ class Framework
$out['terminal'] = $conf['host'] . ':' . $conf['port'];
}
self::printProps($out, $tty_width, $args['log-theme'] === null);
if (!self::$argv['private-mode']) {
self::printProps($out, $tty_width, $args['log-theme'] === null);
}
if ($args['preview'] ?? false) {
exit();
}
@@ -294,7 +296,9 @@ class Framework
self::$server->set($this->server_set);
Console::setServer(self::$server);
self::printMotd($tty_width);
if (!self::$argv['private-mode']) {
self::printMotd($tty_width);
}
global $asd;
$asd = get_included_files();