From 081b719bcbb36008d0e91d50bf6083223c7a79bc Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Mon, 31 Oct 2016 19:46:39 -0400 Subject: [PATCH] style(CLI): don't wrap CLI help outputdrives (#813) `yargs` wraps help output lines, causing the examples to be displayed like this: ``` Examples: /usr/bin/nodejs bin/etcher raspberry-pi.img /usr/bin/nodejs bin/etcher --no-check raspberry-pi.img /usr/bin/nodejs bin/etcher -d /dev/disk2 ubuntu.iso /usr/bin/nodejs bin/etcher -d /dev/disk2 -y rpi.img ``` As a solution, we can set `.wrap(null)` to completely disable wrapping. Fixes: https://github.com/resin-io/etcher/issues/810 Signed-off-by: Juan Cruz Viotti --- lib/cli/cli.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cli/cli.js b/lib/cli/cli.js index 84899771..7bfe75ef 100644 --- a/lib/cli/cli.js +++ b/lib/cli/cli.js @@ -30,6 +30,10 @@ const packageJSON = require('../../package.json'); * @public */ module.exports = yargs + + // Don't wrap at all + .wrap(null) + .demand(1, 'Missing image') // Usage help