Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for handlebars-setup arg #110

Merged
merged 1 commit into from
Jun 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async function getOptions (argv) {
.option('--sort-commits [property]', `sort commits by property, default: ${DEFAULT_OPTIONS.sortCommits}`)
.option('--include-branch [branch]', 'one or more branches to include commits from, comma separated', str => str.split(','))
.option('--release-summary', 'use tagged commit message body as release summary')
.option('--handlebars-setup', 'handlebars setup file')
.option('--handlebars-setup <file>', 'handlebars setup file')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use [file] to be consistent with the above?

Suggested change
.option('--handlebars-setup <file>', 'handlebars setup file')
.option('--handlebars-setup [file]', 'handlebars setup file')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was my first thought, but according to commander doku the arguments in the square brackets are optional. --handlebars-setup option currently does not make sense without value (without JS-file). Therefore I think it would be cleaner if the option value for --handlebars-setup would be mandatory (pointy brackets). If this option value is missing, then a CLI compliant and clear exception is thrown.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woah, I never realised this. I'm happy to merge this, and I'll fix up the others.

.option('--stdout', 'output changelog to stdout')
.version(version)
.parse(argv)
Expand Down