Skip to content

Commit

Permalink
fix(cli): remove undefined from upgrade message (#4692)
Browse files Browse the repository at this point in the history
  • Loading branch information
armandobelardo authored Sep 18, 2024
1 parent aa4a981 commit 6221ad4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ export async function getFernUpgradeMessage({

// To start we're truncating the list and recommending the user use a different command
// to see the full list so as to not overwhelm them
message += await getGeneratorUpgradeMessage({
const generatorUpgradeMessage = await getGeneratorUpgradeMessage({
generatorUpgradeInfo: upgradeInfo.generatorUpgradeInfo,
limit: 2,
includeBoxen: false
});
if (generatorUpgradeMessage != null) {
message += generatorUpgradeMessage;
}

const generatorsNeedingUpgrades = upgradeInfo.generatorUpgradeInfo.filter((gui) => gui.isUpgradeAvailable);
if (generatorsNeedingUpgrades.length > 0) {
message += `\nRun ${chalk.cyan("fern generator upgrade")} to upgrade your generators.`;
Expand Down

0 comments on commit 6221ad4

Please sign in to comment.