We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6acf004 + 1089a58 commit 08a317fCopy full SHA for 08a317f
rustup-init.sh
@@ -90,15 +90,32 @@ main() {
90
local need_tty=yes
91
for arg in "$@"; do
92
case "$arg" in
93
- -h|--help)
+ --help)
94
usage
95
exit 0
96
;;
97
- -y)
98
- # user wants to skip the prompt -- we don't need /dev/tty
99
- need_tty=no
100
- ;;
101
*)
+ OPTIND=1
+ if [ "${arg%%--*}" = "" ]; then
+ # Long option (other than --help);
+ # don't attempt to interpret it.
102
+ continue
103
+ fi
104
+ while getopts :hy sub_arg "$arg"; do
105
+ case "$sub_arg" in
106
+ h)
107
+ usage
108
+ exit 0
109
+ ;;
110
+ y)
111
+ # user wants to skip the prompt --
112
+ # we don't need /dev/tty
113
+ need_tty=no
114
115
+ *)
116
117
+ esac
118
+ done
119
120
esac
121
done
0 commit comments