From 01739fea2accc264bde29be99b53c827f44ba1e9 Mon Sep 17 00:00:00 2001 From: Pete Cook Date: Thu, 20 Jun 2019 13:34:29 +0100 Subject: [PATCH] Fix commander argument syntax Square brackets implies optional input, whereas they are all required (if the option is being used) --- README.md | 2 +- src/run.js | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index a79a7f38..522f1457 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Options: --sort-commits [property] # sort commits by property [relevance, date, date-desc], default: relevance --include-branch [branch] # one or more branches to include commits from, comma separated --release-summary # display tagged commit message body as release summary - --handlebars-setup # handlebars setup file + --handlebars-setup [file] # handlebars setup file --stdout # output changelog to stdout -V, --version # output the version number -h, --help # output usage information diff --git a/src/run.js b/src/run.js index 2f9668a0..9e8a2650 100644 --- a/src/run.js +++ b/src/run.js @@ -24,24 +24,24 @@ const OPTIONS_DOTFILE = '.auto-changelog' async function getOptions (argv) { const options = new Command() - .option('-o, --output [file]', `output file, default: ${DEFAULT_OPTIONS.output}`) - .option('-t, --template [template]', `specify template to use [compact, keepachangelog, json], default: ${DEFAULT_OPTIONS.template}`) - .option('-r, --remote [remote]', `specify git remote to use for links, default: ${DEFAULT_OPTIONS.remote}`) + .option('-o, --output ', `output file, default: ${DEFAULT_OPTIONS.output}`) + .option('-t, --template