Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik committed Apr 7, 2024
1 parent a47f69f commit 5c1d854
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Command/InfoCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Composer\Command\BaseCommand;
use Composer\Composer;
use Composer\Package\BasePackage;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand All @@ -34,7 +33,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$package = $composer->getRepositoryManager()->getLocalRepository()->findPackage($packageName, '*');
if ($package === null) {
$io->error('Package "' . $packageName . '" not found.');
return Command::FAILURE;
return 1;
}
return $this->vendorPackage($composer, $package, $io);
}
Expand All @@ -48,7 +47,7 @@ private function vendorPackage(Composer $composer, BasePackage $package, Symfony
if (empty($settings->packageConfiguration())) {
$io->writeln('');
$io->writeln('<fg=gray>Configuration don\'t found in package "' . $package->getName() . '".</>');
return Command::SUCCESS;
return 0;
}

$io->title('Yii Config — Package "' . $package->getName() . '"');
Expand All @@ -58,7 +57,7 @@ private function vendorPackage(Composer $composer, BasePackage $package, Symfony
$io->section('Configuration groups');
$this->writeConfiguration($io, $settings->packageConfiguration());

return Command::SUCCESS;
return 0;
}

private function rootPackage(Composer $composer, SymfonyStyle $io): int
Expand Down Expand Up @@ -122,7 +121,7 @@ private function rootPackage(Composer $composer, SymfonyStyle $io): int
}
}

return Command::SUCCESS;
return 0;
}

/**
Expand Down

0 comments on commit 5c1d854

Please sign in to comment.