From bb4ad6a042b858a7c88fb6e553da5262d0f57022 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Tue, 26 Apr 2016 09:38:29 -0400 Subject: [PATCH] Add an option to control unmounting on success in Etcher CLI (#362) Signed-off-by: Juan Cruz Viotti --- lib/cli/cli.js | 6 ++++++ lib/cli/etcher.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/cli/cli.js b/lib/cli/cli.js index 40f02b3b..fc9107bf 100644 --- a/lib/cli/cli.js +++ b/lib/cli/cli.js @@ -103,6 +103,12 @@ module.exports = yargs describe: 'confirm non-interactively', boolean: true, alias: 'y' + }, + unmount: { + describe: 'unmount on success', + boolean: true, + alias: 'u', + default: true } }) .argv; diff --git a/lib/cli/etcher.js b/lib/cli/etcher.js index 599f0f7d..47de5442 100644 --- a/lib/cli/etcher.js +++ b/lib/cli/etcher.js @@ -57,7 +57,7 @@ form.run([ return writer.writeImage(options._[0], { device: answers.drive }, { - unmountOnSuccess: false, + unmountOnSuccess: options.unmount, validateWriteOnSuccess: options.check }, function(state) {