Skip to content

Commit

Permalink
fix: Add context and errors to 'show' command
Browse files Browse the repository at this point in the history
  • Loading branch information
linc committed Mar 2, 2024
1 parent da6c313 commit e44a976
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Command/ShowCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ public static function viewFeatureList(string $type, string $name)
}

$writer = new Writer();
$writer->bold->green->write("\n\n" . 'Support for ' . $type . ' ' . $supported[$name]['name'] . "\n");
$writer->table($list, ['head' => 'bold']);

if ($type === 'target' && strtolower($name) === 'vanilla2') {
$writer->bold->green->write("\n" . 'All features are supported for target Vanilla2.' . "\n");
} elseif (!array_key_exists($name, $supported)) {
$writer->bold->yellow->write("\n" . 'Unknown package "' . $name . '". Package is case-sensitive.' . "\n");
} else {
$writer->bold->green->write("\n" . 'Support for ' . $type . ' ' . $supported[$name]['name'] . "\n");
$writer->table($list, ['head' => 'bold']);
}
}
}

0 comments on commit e44a976

Please sign in to comment.