Print help even for expected errors

Change-Type: patch
This commit is contained in:
Tim Perry 2017-11-16 19:11:17 +01:00
parent 08c40195e5
commit eef0d9cdbe
5 changed files with 5 additions and 5 deletions

View File

@ -165,7 +165,7 @@ buildConfig = function(image, deviceType, advanced) {
exports.buildConfig = {
signature: 'os build-config <image> <device-type>',
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',
options: [
commandOptions.advancedConfig, {

View File

@ -224,6 +224,6 @@ exports.expectedError = function(message) {
if (message instanceof Error) {
message = message.message;
}
console.error(chalk.red(message));
exports.printErrorMessage(message);
return process.exit(1);
};

View File

@ -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`.
Examples:
Example:
$ resin os build-config ../path/rpi3.img raspberrypi3 --output rpi3-config.json
$ resin os configure ../path/rpi3.img 7cf02a6 --config "$(cat rpi3-config.json)"

View File

@ -169,7 +169,7 @@ exports.buildConfig =
help: '''
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 configure ../path/rpi3.img 7cf02a6 --config "$(cat rpi3-config.json)"

View File

@ -177,5 +177,5 @@ exports.printErrorMessage = (message) ->
exports.expectedError = (message) ->
if message instanceof Error
message = message.message
console.error(chalk.red(message))
exports.printErrorMessage(message)
process.exit(1)