Skip to content

Commit

Permalink
[minor] add command return codes
Browse files Browse the repository at this point in the history
  • Loading branch information
kbond committed Aug 7, 2020
1 parent b1294be commit e57819c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/InitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
file_put_contents($this->getAddressFile(), $address);

$io->success('Initialized phpMyAdmin, run "phpmyadmin" to start web server.');

return 0;
}
}
4 changes: 3 additions & 1 deletion src/RunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$server->stop($this->getPidFile());
$io->success('Stopped the phpMyAdmin web server.');

return;
return 0;
}

$config = new WebServerConfig(
Expand All @@ -47,6 +47,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (WebServer::STARTED === $server->start($config, $this->getPidFile())) {
$io->success(sprintf('phpMyAdmin web server listening on http://%s', $config->getAddress()));
}

return 0;
}

protected function getPidFile()
Expand Down

0 comments on commit e57819c

Please sign in to comment.