Skip to content

Commit ee7b8d2

Browse files
Dont fail displaying info about not installed recipes
1 parent 78a94b4 commit ee7b8d2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Command/RecipesCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ private function displayPackageInformation(Recipe $recipe)
183183
}
184184

185185
$io->write('<info>name</info> : '.$recipe->getName());
186-
$io->write('<info>version</info> : '.$recipeLock['version']);
186+
$io->write('<info>version</info> : '.($recipeLock['version'] ?? 'n/a'));
187187
$io->write('<info>status</info> : '.$status);
188-
if (!$recipe->isAuto()) {
188+
if (!$recipe->isAuto() && isset($recipeLock['version'])) {
189189
$recipeUrl = sprintf(
190190
'https://%s/tree/%s/%s/%s',
191191
$lockRepo,
@@ -200,7 +200,9 @@ private function displayPackageInformation(Recipe $recipe)
200200

201201
if ($lockRef !== $recipe->getRef()) {
202202
$io->write('<info>latest recipe</info> : '.$recipe->getURL());
203+
}
203204

205+
if ($lockRef !== $recipe->getRef() && isset($recipeLock['version'])) {
204206
$historyUrl = sprintf(
205207
'https://%s/commits/%s/%s',
206208
$lockRepo,

0 commit comments

Comments
 (0)