From e649292ac17919abc66c395af0a04f8a2fc7fc06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Negr=C3=B3n?= Date: Wed, 8 Jan 2025 14:21:37 -0400 Subject: [PATCH] review suggestions --- packages/cli/docs/cli.md | 2 ++ packages/cli/src/oclif/commands/env/set.js | 1 - packages/cli/src/oclif/commands/env/unset.js | 3 ++- packages/cli/src/utils/api.js | 1 - 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/cli/docs/cli.md b/packages/cli/docs/cli.md index 68c49785a..ebc7ae180 100644 --- a/packages/cli/docs/cli.md +++ b/packages/cli/docs/cli.md @@ -225,6 +225,7 @@ resources convert and relate to different actions. * `key-value pairs...` | The key-value pairs to set. Keys are case-insensitive. Each pair should be space separated and pairs should be separated by an `=`. For example: `A=123 B=456` **Flags** +* `-f, --force` | Force the update of environment variables regardless if the app version is production or not. Use with caution. * `-d, --debug` | Show extra debugging output. **Examples** @@ -242,6 +243,7 @@ resources convert and relate to different actions. * `keys...` | The keys to unset. Keys are case-insensitive. **Flags** +* `-f, --force` | Force the update of environment variables regardless if the app version is production or not. Use with caution. * `-d, --debug` | Show extra debugging output. **Examples** diff --git a/packages/cli/src/oclif/commands/env/set.js b/packages/cli/src/oclif/commands/env/set.js index 0bd6edda8..d49111026 100644 --- a/packages/cli/src/oclif/commands/env/set.js +++ b/packages/cli/src/oclif/commands/env/set.js @@ -100,7 +100,6 @@ SetEnvCommand.flags = buildFlags({ char: 'f', description: 'Force the update of environment variables regardless if the app version is production or not. Use with caution.', - hidden: true, }), }, }); diff --git a/packages/cli/src/oclif/commands/env/unset.js b/packages/cli/src/oclif/commands/env/unset.js index 472577a13..5fd09eeb8 100644 --- a/packages/cli/src/oclif/commands/env/unset.js +++ b/packages/cli/src/oclif/commands/env/unset.js @@ -61,6 +61,8 @@ class UnsetEnvCommand extends BaseCommand { `App version ${version} is the production version. Are you sure you want to unset potentially live environment variables?` + ` If so, run this command again with the --force flag.`, ); + } else { + throw e; } } @@ -84,7 +86,6 @@ UnsetEnvCommand.flags = buildFlags({ char: 'f', description: 'Force the update of environment variables regardless if the app version is production or not. Use with caution.', - hidden: true, }), }, }); diff --git a/packages/cli/src/utils/api.js b/packages/cli/src/utils/api.js index 700ee9916..2ca52d9ec 100644 --- a/packages/cli/src/utils/api.js +++ b/packages/cli/src/utils/api.js @@ -97,7 +97,6 @@ const callAPI = async ( } debug(`>> ${requestOptions.method} ${requestOptions.url || res.url}`); - debug(`>> Request Headers: ${JSON.stringify(requestOptions.headers)}`); if (requestOptions.body) { const replacementStr = 'raw zip removed in logs';