add better command help

This commit is contained in:
Uwe Steinmann 2025-11-17 07:06:27 +01:00
parent 1443fcbe60
commit 85979e7899
2 changed files with 4 additions and 4 deletions

View File

@ -41,7 +41,7 @@ class RepositoryextensionCommand extends Command
{
$this->setName('ext:repository')
->setDescription('Get list of extensions from repository')
->setHelp('')
->setHelp('Retrieves the list of extensions from the repository and checks which of them can be updated or installed. If --url is not set, the repository url from the SeedDMS configuraton is used.')
->addOption('url', '', InputOption::VALUE_REQUIRED, 'Url of repository.', null)
;
}

View File

@ -41,7 +41,7 @@ class UpdateextensionCommand extends Command
{
$this->setName('ext:update')
->setDescription('Check for extension upates')
->setHelp('')
->setHelp('Retrieves the list of extensions from the repository and offers to either update or install those extension, which met the dependencies. If --url is not set, the repository url from the SeedDMS configuraton is used.')
->addOption('url', '', InputOption::VALUE_REQUIRED, 'Url of repository.', null)
;
}
@ -106,7 +106,7 @@ class UpdateextensionCommand extends Command
$output->writeln(sprintf("<info>Update extension '%s' to version %s.</info>", $extname, $answer));
if ($tmpfile = $extmgr->getExtensionFromRepository($update[$answer]['filename'])) {
if (0&&!$extmgr->updateExtension($tmpfile)) {
if (!$extmgr->updateExtension($tmpfile)) {
foreach ($extmgr->getErrorMsgs() as $msg) {
$output->writeln(sprintf("<error>%s</error>", $msg));
}
@ -135,7 +135,7 @@ class UpdateextensionCommand extends Command
$output->writeln(sprintf("<info>Install extension '%s' to version %s.</info>", $extname, $answer));
if ($tmpfile = $extmgr->getExtensionFromRepository($install[$answer]['filename'])) {
if (0&&!$extmgr->updateExtension($tmpfile)) {
if (!$extmgr->updateExtension($tmpfile)) {
foreach ($extmgr->getErrorMsgs() as $msg) {
$output->writeln(sprintf("<error>%s</error>", $msg));
}