Merge pull request #2025 from balena-io/convert-help-fixes

Fix issues from removal of capitano
This commit is contained in:
bulldozer-balena[bot] 2020-09-08 12:14:34 +00:00 committed by GitHub
commit d910319ba5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View File

@ -51,9 +51,9 @@ export async function renderMarkdown(): Promise<string> {
// This fake command allows capitanodoc to include help in docs // This fake command allows capitanodoc to include help in docs
class FakeHelpCommand { class FakeHelpCommand {
description = stripIndent` 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 = [ examples = [

View File

@ -186,7 +186,7 @@ Users are encouraged to regularly update the balena CLI to the latest version.
- [envs](#envs) - [envs](#envs)
- [env rm &#60;id&#62;](#env-rm-id) - [env rm &#60;id&#62;](#env-rm-id)
- [env add &#60;name&#62; [value]](#env-add-name-value) - [env add &#60;name&#62; [value]](#env-add-name-value)
- [env rename &#60;name&#62; &#60;value&#62;](#env-rename-name-value) - [env rename &#60;id&#62; &#60;value&#62;](#env-rename-id-value)
- Tags - Tags
@ -1034,7 +1034,7 @@ suppress warning messages
service name service name
## env rename &#60;name&#62; &#60;value&#62; ## env rename &#60;id&#62; &#60;value&#62;
Change the value of a configuration or environment variable for an application, Change the value of a configuration or environment variable for an application,
device or service, as selected by command-line options. device or service, as selected by command-line options.
@ -1214,7 +1214,7 @@ same as '--application'
## help [command] ## 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: Examples:

View File

@ -69,7 +69,7 @@ export default class EnvRenameCmd extends Command {
}, },
]; ];
public static usage = 'env rename <name> <value>'; public static usage = 'env rename <id> <value>';
public static flags: flags.Input<FlagsDef> = { public static flags: flags.Input<FlagsDef> = {
config: ec.booleanConfig, config: ec.booleanConfig,

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
import { stripIndent } from './utils/lazy'; import { stripIndent } from './utils/lazy';
import { ExpectedError } from './errors'; import { exitWithExpectedError } from './errors';
export interface AppOptions { export interface AppOptions {
// Prevent the default behavior of flushing stdout after running a command // Prevent the default behavior of flushing stdout after running a command
@ -101,7 +101,7 @@ export function checkDeletedCommand(argvSlice: string[]): void {
version: string, version: string,
verb = 'replaced', verb = 'replaced',
) { ) {
throw new ExpectedError(stripIndent` exitWithExpectedError(stripIndent`
Note: the command "balena ${oldCmd}" was ${verb} in CLI version ${version}. Note: the command "balena ${oldCmd}" was ${verb} in CLI version ${version}.
Please use "balena ${alternative}" instead. Please use "balena ${alternative}" instead.
`); `);
@ -111,7 +111,7 @@ export function checkDeletedCommand(argvSlice: string[]): void {
if (alternative) { if (alternative) {
msg = [msg, alternative].join('\n'); msg = [msg, alternative].join('\n');
} }
throw new ExpectedError(msg); exitWithExpectedError(msg);
} }
const stopAlternative = const stopAlternative =
'Please use "balena ssh -s" to access the host OS, then use `balena-engine stop`.'; 'Please use "balena ssh -s" to access the host OS, then use `balena-engine stop`.';