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

misc(cli): improve error if invalid value for --output argument is passed #12836

Merged
merged 7 commits into from
Aug 11, 2021

Conversation

svkrclg
Copy link
Contributor

@svkrclg svkrclg commented Jul 29, 2021

Summary
Improve --output error message for invalid values.

Related Issues/PRs
#12787

@google-cla
Copy link

google-cla bot commented Jul 29, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Jul 29, 2021
@svkrclg svkrclg changed the title improve erorr if invalid value for --ouput argument is passed improve error if invalid value for --output argument is passed Jul 29, 2021
@svkrclg
Copy link
Contributor Author

svkrclg commented Jul 29, 2021

@googlebot I signed it!

@google-cla google-cla bot added cla: yes and removed cla: no labels Jul 29, 2021
@svkrclg svkrclg changed the title improve error if invalid value for --output argument is passed misc(cli): improve error if invalid value for --output argument is passed Jul 29, 2021
@svkrclg svkrclg marked this pull request as ready for review July 30, 2021 15:22
@svkrclg svkrclg requested a review from a team as a code owner July 30, 2021 15:22
@svkrclg svkrclg requested review from adamraine and removed request for a team July 30, 2021 15:22
const validValues = strings.filter(/** @return {str is LH.OutputMode} */ str => {
if (!outputTypes.includes(str)) {
throw new Error(`"${str}" is not a valid 'output' value. ` + errorHint);
} return true;
Copy link
Member

Choose a reason for hiding this comment

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

nit

Suggested change
} return true;
}
return true;

@svkrclg
Copy link
Contributor Author

svkrclg commented Jul 31, 2021

hey @adamraine how can I retrigger the failed checks?

@patrickhulce
Copy link
Collaborator

@svkrclg I restarted them for ya :)

@svkrclg
Copy link
Contributor Author

svkrclg commented Jul 31, 2021

Thanks @patrickhulce .
Also, are there existing issues with the failed checks? Mostly the errors are related PROTOCOL_TIMEOUT, Segmentation fault (core dumped)

@patrickhulce
Copy link
Collaborator

Yes we are currently struggling with many node and Chromium side bugs in our tests :/ don't worry about those definitely not your doing! we're trying to sort out those issues this week.

@svkrclg
Copy link
Contributor Author

svkrclg commented Aug 1, 2021

Great, thanks @patrickhulce

@adamraine adamraine merged commit a9d68f6 into GoogleChrome:master Aug 11, 2021
@svkrclg svkrclg deleted the improve-output-args-error branch August 11, 2021 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants