From 136b0dc1a6d47ace945ae67aad30fc3e477ab70b Mon Sep 17 00:00:00 2001 From: xl Date: Thu, 6 Jul 2023 15:38:03 +0800 Subject: [PATCH] qqq --- ServerCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ServerCommand.php b/ServerCommand.php index 12a746c..4bcd68c 100644 --- a/ServerCommand.php +++ b/ServerCommand.php @@ -40,7 +40,7 @@ class ServerCommand extends Command $this->setName('sw:server') ->setDescription('server start|stop|reload|restart') ->addArgument('action', InputArgument::OPTIONAL, 'run action', 'start') - ->addOption('daemon', 'd', InputOption::VALUE_OPTIONAL, 'is run daemonize'); + ->addOption('daemon', 'd', InputOption::VALUE_NONE, 'is run daemonize'); } @@ -97,7 +97,7 @@ class ServerCommand extends Command */ protected function start(InputInterface $input): int { - $this->server->setDaemon((int)!is_null($input->getOption('daemon'))); + $this->server->setDaemon((int)($input->getOption('daemon'))); $this->server->start(); return 1; }