diff --git a/packages/imperative/CHANGELOG.md b/packages/imperative/CHANGELOG.md index 8cc88bacd..bdb59097f 100644 --- a/packages/imperative/CHANGELOG.md +++ b/packages/imperative/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to the Imperative package will be documented in this file. ## Recent Changes -- BugFix: Modified showMsgWhenDeprecated() function to allow an empty string as a parameter when no replacement is availible for the deprecated command. When no replacement is availible an alternative message will be printed. [#2041](https://github.com/zowe/zowe-cli/issues/2041) +- BugFix: Modified `showMsgWhenDeprecated` function to allow an empty string as a parameter when no replacement is available for the deprecated command. When no replacement is available an alternative message will be printed. [#2041](https://github.com/zowe/zowe-cli/issues/2041) ## `5.26.3` diff --git a/packages/imperative/src/cmd/src/help/DefaultHelpGenerator.ts b/packages/imperative/src/cmd/src/help/DefaultHelpGenerator.ts index c772d077c..e5cb1ed23 100644 --- a/packages/imperative/src/cmd/src/help/DefaultHelpGenerator.ts +++ b/packages/imperative/src/cmd/src/help/DefaultHelpGenerator.ts @@ -222,7 +222,7 @@ export class DefaultHelpGenerator extends AbstractHelpGenerator { let summaryText: string = ""; summaryText += command.summary || command.description; - if (command.deprecatedReplacement) { + if (command.deprecatedReplacement != null) { // Mark with the deprecated tag summaryText += this.grey(" (deprecated)"); } else if (command.experimental) { diff --git a/packages/imperative/src/utilities/src/CliUtils.ts b/packages/imperative/src/utilities/src/CliUtils.ts index 16e487406..63e06eaf6 100644 --- a/packages/imperative/src/utilities/src/CliUtils.ts +++ b/packages/imperative/src/utilities/src/CliUtils.ts @@ -378,7 +378,7 @@ export class CliUtils { * @memberof CliUtils */ public static showMsgWhenDeprecated(handlerParms: IHandlerParameters) { - let oldCmd: string | number; + let oldCmd: string; if (handlerParms.definition.deprecatedReplacement || handlerParms.definition.deprecatedReplacement === "") { // form the command that is deprecated if(handlerParms.definition.deprecatedReplacement === "")