Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/cli/src/commands/doctor/doctor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ const printCategory = ({label, key}: {label: string; key: number}) => {

const printVersions = ({version, versions, versionRange}) => {
if (versions) {
const versionsToShow = versions.join(', ');
const versionsToShow = Array.isArray(versions)
? versions.join(', ')
: 'N/A';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the HealthCheckResult types to account for this type, so we can avoid similar issues in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @thymikee, thanks very much for the pointers, I have made the changes :) Thanks!


logMessage(`- Versions found: ${chalk.red(versionsToShow)}`);
logMessage(`- Version supported: ${chalk.green(versionRange)}`);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/doctor/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export type HealthCheckResult = {
label: string;
needsToBeFixed: boolean;
version?: 'Not Found' | string;
versions?: [string];
versions?: [string] | string;
versionRange?: string;
description: string | undefined;
runAutomaticFix: RunAutomaticFix;
Expand Down