This commit is contained in:
2022-09-27 12:47:30 +02:00
parent 592f5579ab
commit 0b66b826f7
5 changed files with 24 additions and 8 deletions

View File

@ -14,7 +14,7 @@ class StopCommand extends Command
protected function configure()
{
$this->addOption("instance", "I", InputOption::VALUE_REQUIRED, "Specify the instance name", "default");
$this->addOption("instance", "i", InputOption::VALUE_REQUIRED, "Specify the instance name", "default");
$this->addArgument("service", InputArgument::REQUIRED, "The service name");
}
@ -25,6 +25,7 @@ class StopCommand extends Command
$serviceName = $input->getArgument("service");
$instanceName = $input->getOption("instance");
$serviceInfo = $serviceRegistry->findServiceByName($serviceName);
if (!$serviceInfo) {
@ -32,7 +33,7 @@ class StopCommand extends Command
return self::FAILURE;
}
$containerManager->stopService($serviceInfo, $input->getOption("instance"));
$containerManager->stopService($serviceInfo, $instanceName);
return self::SUCCESS;
}