Skip to content

Commit

Permalink
feat: switched back to previous flag of "prompt"
Browse files Browse the repository at this point in the history
  • Loading branch information
ImJohnMDaniel committed Nov 5, 2024
1 parent a9d6b65 commit c6572ef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
8 changes: 4 additions & 4 deletions messages/toolbox.package.dependencies.install.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ Installation key for key-protected packages

Installation key for key-protected packages in the key:value format of SubscriberPackageVersionId:Key. Specify multiple "--installation-key" flags for more than one key

# flags.no-prompt.summary
# flags.prompt.summary

Don't prompt for confirmation.
Prompt for confirmation.

# flags.no-prompt.description
# flags.prompt.description

Allows the following without an explicit confirmation response: 1) Remote Site Settings and Content Security Policy websites to send or receive data, and 2) --upgrade-type Delete to proceed.
Require explicit confirmation response: 1) Remote Site Settings and Content Security Policy websites to send or receive data, and 2) --upgrade-type Delete to proceed.

# flags.publish-wait.summary

Expand Down
20 changes: 6 additions & 14 deletions src/commands/toolbox/package/dependencies/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ export default class PackageDependenciesInstall extends SfCommand<PackageToInsta
char: 'k',
multiple: true,
}),
'no-prompt': Flags.boolean({
summary: messages.getMessage('flags.no-prompt.summary'),
description: messages.getMessage('flags.no-prompt.description'),
char: 'r',
prompt: Flags.boolean({
summary: messages.getMessage('flags.prompt.summary'),
description: messages.getMessage('flags.prompt.description'),
char: 'p',
default: false,
required: false,
}),
Expand All @@ -113,15 +113,7 @@ export default class PackageDependenciesInstall extends SfCommand<PackageToInsta
description: messages.getMessage('flags.skip-handlers.description'),
hidden: true,
}),
// 'target-dev-hub': Flags.string({
// summary: messages.getMessage('flags.target-dev-hub.summary'),
// char: 'v',
// }),
'target-dev-hub': optionalHubFlagWithDeprecations,
// 'target-org': Flags.requiredOrg({
// summary: messages.getMessage('flags.target-dev-hub.summary'),
// charAliases: ['b'],
// }),
'target-org': requiredOrgFlagWithDeprecations,
'upgrade-type': Flags.custom<'DeprecateOnly' | 'Mixed' | 'Delete'>({
options: ['DeprecateOnly', 'Mixed', 'Delete'],
Expand Down Expand Up @@ -366,8 +358,8 @@ export default class PackageDependenciesInstall extends SfCommand<PackageToInsta
this.spinner.stop();
}

// If the user has not specified --no-prompt, process prompts
if (!flags['no-prompt']) {
// If the user has specified --prompt, process prompts
if (flags['prompt']) {
// If the user has specified --upgradetype Delete, then prompt for confirmation for Unlocked Packages
if (flags['upgrade-type'] === 'Delete' && (await subscriberPackageVersion.getPackageType()) === 'Unlocked') {
const promptMsg = messages.getMessage('prompt.upgradeType');
Expand Down

0 comments on commit c6572ef

Please sign in to comment.