fix(rustup-init/sh): prevent passing --default-host twice#4756
fix(rustup-init/sh): prevent passing --default-host twice#4756rami3l merged 1 commit intorust-lang:mainfrom
--default-host twice#4756Conversation
There was a problem hiding this comment.
Changes look good to me.
I think an argument could be made that rustup should just use the last value passed in. I don't think this is clear cut though and could do with some more discussion. For example, rustc only allows one --target (is that a mistake? is --default-host different? I don't know).
@ChrisDenton Yeah that's how I did the review 😅 clearly confused rustup with something else; but we could easily revert this if we are going that way. I'd say I'll merge upon @abr-egn's approval. |
@rami3l most CLI tools follow this convention of "last flag wins", as @ChrisDenton notes. we could just take a 'belt and suspenders' approach to this;
@ChrisDenton |
Follow-up of #4497, closes #4755.
My apologies for having misled you @cachebag on this one (I mistakenly thought rustup followed the GNU coreutils conventions, but should we adopt just that in rustup the binary instead?) 🙇
@abr-egn Please feel free to test the patch locally if you have time 🙏