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

Rename cargo-update to cargo-updat #413

Closed
wants to merge 1 commit into from

Conversation

alexcrichton
Copy link
Member

Any executable with the substring "update" on windows is subject to requiring
privilege escalation. For now we just rename the actual executable to
cargo-updat but rename all usage of it so that it's not actually visible.

Closes #393

Any executable with the substring "update" on windows is subject to requiring
privilege escalation. For now we just rename the actual executable to
`cargo-updat` but rename all usage of it so that it's not actually visible.

Closes rust-lang#393
@Locke23rus
Copy link

How about another word sync/upgrade/pull ?

@whitequark
Copy link
Member

You can add a manifest instead of renaming, e.g. see https://github.com/0install/0install/blob/master/ocaml/0install.exe.manifest.

@alexcrichton
Copy link
Member Author

@whitequark, rustc itself started doing this as part of rust-lang/rust#10878, but it was reverted in rust-lang/rust#11221. The tracking issue for doing this is rust-lang/rust#11207. Adding a manifest should be part of rustc, not cargo

@Locke23rus, we could, but I think that "update" is really the right word for this and the ergonomics are not compromised here at all, so it's not too much of a worry.

@conradkleinespel
Copy link

I'm pro renaming it to something that is an actual word as well. cargo-updat just makes it look broken IMO.

I like the suggestions of @Locke23rus. cargo-upgrade would be a good option I think: it is simple and at least on UNIX, a lot are used to either brew upgrade or apt-get upgrade. Or how about cargo-update for UNIX platforms and cargo-updat for Windows? Don't know if that'd be hard to implement, just suggesting.

@SimonSapin
Copy link
Contributor

cargo-updat is fine: users typically never see it. They still type cargo update (note the space.)

https://github.com/rust-lang/cargo/pull/413/files#diff-847cd20bb1f94e626f11c2eb7358f4beR192

let cmd = if cmd == "update" {"updat"} else {cmd};
let command_exe = format!("cargo-{}{}", cmd, os::consts::EXE_SUFFIX);

@nathantypanski
Copy link

Just rename the binary to cargo-up. People will stop complaining that it's not a whole word, and you can use the same explanation as given here, and it still doesn't matter because users don't see it.

Edit: I will admit that when I first read the subject I thought alexcrichton had lost his mind and checked my calendar to make sure it's not April. It perhaps might confuse future code contributors if you name it cargo-updat.

@conradkleinespel
Copy link

@nathantypanski 👍

@alexcrichton
Copy link
Member Author

I'm going to take a different strategy.

@alexcrichton alexcrichton deleted the issue-393 branch August 22, 2014 16:26
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.

cargo update requires elevation on windows
6 participants