From 9402b4e4a15746eb2f2bb33dd177b80e6a5bc865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 19 Oct 2021 17:09:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http-server/ServerCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http-server/ServerCommand.php b/http-server/ServerCommand.php index 7d74c788..4f3966ba 100644 --- a/http-server/ServerCommand.php +++ b/http-server/ServerCommand.php @@ -49,7 +49,7 @@ class ServerCommand extends Command $this->setName('sw:server') ->setDescription('server start|stop|reload|restart') ->addArgument('action', InputArgument::REQUIRED) - ->addOption('daemon', 'd', InputOption::VALUE_NONE,'is run daemonize'); + ->addOption('daemon', 'd', InputOption::VALUE_NONE,'is run daemonize',-1); } @@ -63,7 +63,7 @@ class ServerCommand extends Command { try { $manager = Kiri::app()->getServer(); - $manager->setDaemon((int)$input->hasOption('daemon')); + $manager->setDaemon((int)is_null($input->getOption('daemon'))); if (!in_array($input->getArgument('action'), self::ACTIONS)) { throw new Exception('I don\'t know what I want to do.'); }