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 missing space in error message #2619

Merged
merged 3 commits into from
Dec 29, 2020
Merged

Conversation

dralley
Copy link
Contributor

@dralley dralley commented Dec 25, 2020

This PR is 2 commits. The first simply fixes and issue that wasn't totally resolved by 5414c42 (the other branch of the "if" statement wasn't covered). The second goes further and does some cleanup that I thought would be worthwhile (removing duplicated code, making the channel quoted as in unavailable for download for channel 'beta', making the use of newline more consistent, etc.).

new behavior: left
Screenshot from 2020-12-25 00-07-45

@dralley
Copy link
Contributor Author

dralley commented Dec 25, 2020

Looks like I broke the expectations of the tests.

(actual)
    error: component 'rust-std' for target 'x86_64-unknown-linux-gnu' is unavailable for download for channel 'nightly'
 (expected)
    error: component 'rust-std' for target 'x86_64-unknown-linux-gnu' is unavailable for download for channel nightly

I can either drop that part of the patch or update the tests -- which would you prefer?

@kinnison
Copy link
Contributor

Sorry for the delay, winter break is getting in the way of my rust work 😁

I think that as you're improving error messages, it makes most sense to adjust the tests to match your improved messages, however it'll be worth checking each time you update the tests to ensure that the resulting message actually does look better once in context.

Most rustup tests don't look for the exact message so you likely won't have to adjust many.

Thank you for this.

@dralley
Copy link
Contributor Author

dralley commented Dec 28, 2020

@kinnison No worries, enjoy your vacation :)

I updated the test expectations

Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

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

This looks good, thank you 👍

@kinnison kinnison merged commit ca6cd05 into rust-lang:master Dec 29, 2020
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.

2 participants