Repository navigation
fix(cli): reject a wrong --wait and --json with --markdown, and send the usage to stderr - #438
Merged
Merged
Conversation
…the usage to stderr --wait with a value that is not a number, such as "abc", became NaN, which the runner takes as no wait: the snippets ran at once and nothing said so. It takes only a whole number of milliseconds, and anything else exits with 2 before the browser opens. --json with --markdown printed the markdown report; it is a usage error. Without a URL or --matrix, the usage went to stdout with exit code 2; it goes to stderr, as every other usage error. An unknown workflow lists the ones there are.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on #437.
Four wrong uses of the options that the CLI took without a word, all of them now a usage error with exit code
2before the browser opens:--wait abcbecameNaN, which the runner takes as no wait, so the snippets ran at once.--waittakes only a whole number of milliseconds.--jsonwith--markdownprinted the markdown report.--matrix, the usage went to stdout; it goes to stderr, as every other usage error.--helpstill prints it to stdout with exit code0.--workflowlists the workflows there are.Test plan
cli/tests/e2e/options.test.js.npm run test:unit --prefix clilocally: 607 of 607.options,matrix,url-protocol,fail-on,secrets): 46 of 46. The rest of the e2e tests run in CI.npm run lintlocally.2, nothing in stdout and the message in stderr.