-
Notifications
You must be signed in to change notification settings - Fork 892
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
allow non-utf8 arguments to proxies #1599
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than being unsure what 'proxies' are in this context, I think this change looks sensible. Certainly preferable to a panic, though I worry if the user might be surprised if they enter a non-utf8 toolchain name and are then confused when instead of honouring it, it is silently ignored.
src/rustup-cli/proxy_mode.rs
Outdated
} else { | ||
None | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we do the .starts_with('+')
before the .to_str()
and issue an error if the user has specified a non-utf8 toolchain name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the check and two more tests.
This looks good, but I agree it would be better to warn the user rather than silently ignore it. |
a46990f
to
deea97e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to do as requested, thank you for the change and the tests.
Thanks! |
Fixes rust-lang/rust#56146.