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

Detect '-y' short option in rustup-init.sh more robustly #2815

Merged
merged 1 commit into from
Jul 13, 2021

Conversation

umanwizard
Copy link
Contributor

Fixes #2813

@kinnison
Copy link
Contributor

kinnison commented Jul 3, 2021

Thank you for making this change, before I review it fully, I notice it uses the getopts shell builtin -- are you confident this will work with /bin/sh on BSDs and Illumos (i.e. ksh and friends)? If so then good, but if you can't be sure then we need to find some people to test it because we don't have anything to that effect in our CI currently really.

@umanwizard
Copy link
Contributor Author

This uses pure POSIX shell features, so it should work on any Unix-like OS.

I have tested on FreeBSD and it works fine there.

I was not able to test the full script on Illumos because the version I tried does not support rustup at all, but I have tested getopts and shell substitution syntax there and verified that they work the way POSIX specifies, so I am confident that the script will work there too.

@kinnison
Copy link
Contributor

kinnison commented Jul 5, 2021

Okay thanks for doing that check.

@umanwizard
Copy link
Contributor Author

Ping, @kinnison , can this be merged?

@kinnison kinnison merged commit 08a317f into rust-lang:master Jul 13, 2021
@kinnison
Copy link
Contributor

Yep, thank you for your contribution.

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.

When -y is combined with other short options, rustup-init cannot be used without a terminal.
2 participants