From 504877c232d9c23f82c1b692b7b20a44150e91f4 Mon Sep 17 00:00:00 2001 From: Scott Lowe Date: Tue, 8 Sep 2020 13:13:53 +0200 Subject: [PATCH 1/3] Fix issue with replaced command checks Change-type: patch Resolves: #2022 Signed-off-by: Scott Lowe --- lib/preparser.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/preparser.ts b/lib/preparser.ts index 6a355930..c7abd6bc 100644 --- a/lib/preparser.ts +++ b/lib/preparser.ts @@ -15,7 +15,7 @@ * limitations under the License. */ import { stripIndent } from './utils/lazy'; -import { ExpectedError } from './errors'; +import { exitWithExpectedError } from './errors'; export interface AppOptions { // Prevent the default behavior of flushing stdout after running a command @@ -101,7 +101,7 @@ export function checkDeletedCommand(argvSlice: string[]): void { version: string, verb = 'replaced', ) { - throw new ExpectedError(stripIndent` + exitWithExpectedError(stripIndent` Note: the command "balena ${oldCmd}" was ${verb} in CLI version ${version}. Please use "balena ${alternative}" instead. `); @@ -111,7 +111,7 @@ export function checkDeletedCommand(argvSlice: string[]): void { if (alternative) { msg = [msg, alternative].join('\n'); } - throw new ExpectedError(msg); + exitWithExpectedError(msg); } const stopAlternative = 'Please use "balena ssh -s" to access the host OS, then use `balena-engine stop`.'; From 238c371adef610309265a64e4833d4e415f3c51d Mon Sep 17 00:00:00 2001 From: Scott Lowe Date: Tue, 8 Sep 2020 13:23:39 +0200 Subject: [PATCH 2/3] Fix typo in docs help section Change-type: patch Resolves: #2020 Signed-off-by: Scott Lowe --- automation/capitanodoc/index.ts | 4 ++-- doc/cli.markdown | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/automation/capitanodoc/index.ts b/automation/capitanodoc/index.ts index 78a9a21c..762a512a 100644 --- a/automation/capitanodoc/index.ts +++ b/automation/capitanodoc/index.ts @@ -51,9 +51,9 @@ export async function renderMarkdown(): Promise { // This fake command allows capitanodoc to include help in docs class FakeHelpCommand { description = stripIndent` - List balena commands, or get detailed help for an specific command. + List balena commands, or get detailed help for a specific command. - List balena commands, or get detailed help for an specific command. + List balena commands, or get detailed help for a specific command. `; examples = [ diff --git a/doc/cli.markdown b/doc/cli.markdown index 5b85ce92..480b3948 100644 --- a/doc/cli.markdown +++ b/doc/cli.markdown @@ -1214,7 +1214,7 @@ same as '--application' ## help [command] -List balena commands, or get detailed help for an specific command. +List balena commands, or get detailed help for a specific command. Examples: From 5e5a2c1c85d09020fb53a0e80db9efee9940e885 Mon Sep 17 00:00:00 2001 From: Scott Lowe Date: Tue, 8 Sep 2020 13:31:41 +0200 Subject: [PATCH 3/3] Fix usage info for env rename Change-type: patch Resolves: #2019 Signed-off-by: Scott Lowe --- doc/cli.markdown | 4 ++-- lib/actions-oclif/env/rename.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/cli.markdown b/doc/cli.markdown index 480b3948..03427967 100644 --- a/doc/cli.markdown +++ b/doc/cli.markdown @@ -186,7 +186,7 @@ Users are encouraged to regularly update the balena CLI to the latest version. - [envs](#envs) - [env rm <id>](#env-rm-id) - [env add <name> [value]](#env-add-name-value) - - [env rename <name> <value>](#env-rename-name-value) + - [env rename <id> <value>](#env-rename-id-value) - Tags @@ -1034,7 +1034,7 @@ suppress warning messages service name -## env rename <name> <value> +## env rename <id> <value> Change the value of a configuration or environment variable for an application, device or service, as selected by command-line options. diff --git a/lib/actions-oclif/env/rename.ts b/lib/actions-oclif/env/rename.ts index adb3915a..72006146 100644 --- a/lib/actions-oclif/env/rename.ts +++ b/lib/actions-oclif/env/rename.ts @@ -69,7 +69,7 @@ export default class EnvRenameCmd extends Command { }, ]; - public static usage = 'env rename '; + public static usage = 'env rename '; public static flags: flags.Input = { config: ec.booleanConfig,