mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-02 03:56:39 +00:00
Print help even for expected errors
Change-Type: patch
This commit is contained in:
parent
08c40195e5
commit
eef0d9cdbe
@ -165,7 +165,7 @@ buildConfig = function(image, deviceType, advanced) {
|
|||||||
exports.buildConfig = {
|
exports.buildConfig = {
|
||||||
signature: 'os build-config <image> <device-type>',
|
signature: 'os build-config <image> <device-type>',
|
||||||
description: 'build the OS config and save it to the JSON file',
|
description: 'build the OS config and save it to the JSON file',
|
||||||
help: 'Use this command to prebuild the OS config once and skip the interactive part of `resin os configure`.\n\nExamples:\n\n $ resin os build-config ../path/rpi3.img raspberrypi3 --output rpi3-config.json\n $ resin os configure ../path/rpi3.img 7cf02a6 --config "$(cat rpi3-config.json)"',
|
help: 'Use this command to prebuild the OS config once and skip the interactive part of `resin os configure`.\n\nExample:\n\n $ resin os build-config ../path/rpi3.img raspberrypi3 --output rpi3-config.json\n $ resin os configure ../path/rpi3.img 7cf02a6 --config "$(cat rpi3-config.json)"',
|
||||||
permission: 'user',
|
permission: 'user',
|
||||||
options: [
|
options: [
|
||||||
commandOptions.advancedConfig, {
|
commandOptions.advancedConfig, {
|
||||||
|
@ -224,6 +224,6 @@ exports.expectedError = function(message) {
|
|||||||
if (message instanceof Error) {
|
if (message instanceof Error) {
|
||||||
message = message.message;
|
message = message.message;
|
||||||
}
|
}
|
||||||
console.error(chalk.red(message));
|
exports.printErrorMessage(message);
|
||||||
return process.exit(1);
|
return process.exit(1);
|
||||||
};
|
};
|
||||||
|
@ -894,7 +894,7 @@ or 'menu' (will show the interactive menu)
|
|||||||
|
|
||||||
Use this command to prebuild the OS config once and skip the interactive part of `resin os configure`.
|
Use this command to prebuild the OS config once and skip the interactive part of `resin os configure`.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
|
|
||||||
$ resin os build-config ../path/rpi3.img raspberrypi3 --output rpi3-config.json
|
$ resin os build-config ../path/rpi3.img raspberrypi3 --output rpi3-config.json
|
||||||
$ resin os configure ../path/rpi3.img 7cf02a6 --config "$(cat rpi3-config.json)"
|
$ resin os configure ../path/rpi3.img 7cf02a6 --config "$(cat rpi3-config.json)"
|
||||||
|
@ -169,7 +169,7 @@ exports.buildConfig =
|
|||||||
help: '''
|
help: '''
|
||||||
Use this command to prebuild the OS config once and skip the interactive part of `resin os configure`.
|
Use this command to prebuild the OS config once and skip the interactive part of `resin os configure`.
|
||||||
|
|
||||||
Examples:
|
Example:
|
||||||
|
|
||||||
$ resin os build-config ../path/rpi3.img raspberrypi3 --output rpi3-config.json
|
$ resin os build-config ../path/rpi3.img raspberrypi3 --output rpi3-config.json
|
||||||
$ resin os configure ../path/rpi3.img 7cf02a6 --config "$(cat rpi3-config.json)"
|
$ resin os configure ../path/rpi3.img 7cf02a6 --config "$(cat rpi3-config.json)"
|
||||||
|
@ -177,5 +177,5 @@ exports.printErrorMessage = (message) ->
|
|||||||
exports.expectedError = (message) ->
|
exports.expectedError = (message) ->
|
||||||
if message instanceof Error
|
if message instanceof Error
|
||||||
message = message.message
|
message = message.message
|
||||||
console.error(chalk.red(message))
|
exports.printErrorMessage(message)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user