From 18cc0c5cd97d8fe0fe35e7e80c2d95e8d51de20d Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Wed, 7 Sep 2016 14:00:22 -0700 Subject: [PATCH] minifix(CLI): only show final checksum if one exists (#692) The Etcher CLI displays a nice `Checksum: $checksum` message upon completion. Since the addition of bmap support, a checksum for an image might not be calculated, causing the CLI to display `Checksum: undefined`. This PR takes care of this small UX issue by only showing the checksum message if one indeed exists. Signed-off-by: Juan Cruz Viotti --- lib/cli/etcher.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/cli/etcher.js b/lib/cli/etcher.js index ef9c08fa..6b5f9417 100644 --- a/lib/cli/etcher.js +++ b/lib/cli/etcher.js @@ -102,7 +102,11 @@ form.run([ } console.log('Your flash is complete!'); - console.log(`Checksum: ${results.sourceChecksum}`); + + if (results.sourceChecksum) { + console.log(`Checksum: ${results.sourceChecksum}`); + } + }).then(() => { process.exit(EXIT_CODES.SUCCESS); });