From da85aa31aad21d7780b2976cfb290889b113450a Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Tue, 28 Mar 2017 09:41:38 -0400 Subject: [PATCH] style(CLI): improve error message when drive doesn't exist anymore (#1222) The current message is short and unfriendly. Fixes: https://github.com/resin-io/etcher/issues/1125 Signed-off-by: Juan Cruz Viotti --- lib/cli/etcher.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/cli/etcher.js b/lib/cli/etcher.js index a860a6e0..05703704 100644 --- a/lib/cli/etcher.js +++ b/lib/cli/etcher.js @@ -80,7 +80,10 @@ isElevated().then((elevated) => { }); if (!selectedDrive) { - throw errors.createUserError('Drive not found', `${answers.drive} doesn't exist`); + throw errors.createUserError( + 'The selected drive was not found', + `We can't find ${answers.drive} in your system. Did you unplug the drive?` + ); } return writer.writeImage(imagePath, selectedDrive, {