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

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

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

domsleee
Copy link
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
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