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 <jviotti@openmailbox.org>
This commit is contained in:
Juan Cruz Viotti 2016-09-07 14:00:22 -07:00 committed by GitHub
parent 0ff0c77acc
commit 18cc0c5cd9

View File

@ -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);
});