Skip to content

Commit

Permalink
fix: use correct message based on flags
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Aug 18, 2022
1 parent d749b0f commit 84a3d96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/commands/force/package/beta/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class PackageDeleteCommand extends SfdxCommand {
noprompt: flags.boolean({
char: 'n',
description: messages.getMessage('noPrompt'),
longDescription: messages.getMessage('noPrompt'),
longDescription: messages.getMessage('noPromptLong'),
}),
package: flags.string({
char: 'p',
Expand All @@ -39,8 +39,9 @@ export class PackageDeleteCommand extends SfdxCommand {
};

public async run(): Promise<PackageSaveResult> {
const promptMsg = this.flags.undelete ? 'promptUndelete' : 'promptDelete';
const accepted =
this.flags.noprompt || this.flags.json ? true : await this.ux.confirm(messages.getMessage('prompt'));
this.flags.noprompt || this.flags.json ? true : await this.ux.confirm(messages.getMessage(promptMsg));
if (!accepted) {
throw messages.createError('promptDeleteDeny');
}
Expand Down

0 comments on commit 84a3d96

Please sign in to comment.