Skip to content

Commit 75108be

Browse files
committed
Remove exception to help debugging problems
1 parent 371c6b8 commit 75108be

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

src/Command/ReleaseCommand.php

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
7777
$branches = array_keys($this->configs['projects'][$project]['branches']);
7878
$branch = \count($branches) > 1 ? next($branches) : current($branches);
7979

80-
try {
81-
$package = $this->packagistClient->get(static::PACKAGIST_GROUP.'/'.$project);
82-
$this->io->title($package->getName());
83-
$this->prepareRelease($package, $branch, $output);
84-
} catch (ExceptionInterface $e) {
85-
$this->io->error('Failed with message: '.$e->getMessage());
86-
}
80+
$package = $this->packagistClient->get(static::PACKAGIST_GROUP.'/'.$project);
81+
$this->io->title($package->getName());
82+
$this->prepareRelease($package, $branch, $output);
8783

8884
return 0;
8985
}
@@ -113,14 +109,10 @@ private function prepareRelease(Package $package, $branch, OutputInterface $outp
113109
{
114110
$repositoryName = $this->getRepositoryName($package);
115111

116-
try {
117-
$currentRelease = $this->githubClient->repo()->releases()->latest(
118-
static::GITHUB_GROUP,
119-
$repositoryName
120-
);
121-
} catch (ExceptionInterface $e) {
122-
throw new RuntimeException('Current release not found');
123-
}
112+
$currentRelease = $this->githubClient->repo()->releases()->latest(
113+
static::GITHUB_GROUP,
114+
$repositoryName
115+
);
124116

125117
$branchToRelease = $this->githubClient->repo()->branches(
126118
static::GITHUB_GROUP,

0 commit comments

Comments
 (0)