Skip to content

Add error message when --dist is not specified.#504

Merged
tschaub merged 1 commit intotschaub:mainfrom
domsleee:cli-add-dist-error-message
Aug 11, 2023
Merged

Add error message when --dist is not specified.#504
tschaub merged 1 commit intotschaub:mainfrom
domsleee:cli-add-dist-error-message

Conversation

@domsleee
Copy link
Copy Markdown
Contributor

Fixes #354 by adding a descriptive message.

Previous behaviour

❯ npx gh-pages .
The "paths[1]" argument must be of type string. Received undefined

New behaviour

❯ npx gh-pages .
No base directory specified. The `--dist` option must be specified.

Other notes

I also used Command() instead of the singleton CommanderStatic, since it makes it more testable.
With const program = require('commander');, values like program.user were being carried from previous tests 👍

@domsleee domsleee marked this pull request as ready for review August 10, 2023 09:49
Copy link
Copy Markdown
Owner

@tschaub tschaub left a comment

Choose a reason for hiding this comment

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

Thanks, @domsleee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The "path" argument must be of type string. Received type undefined

2 participants