-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Use getuid
to check instead of USER
env var in rustbuild
#100852
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. Please see the contribution instructions for more information. |
r=me with commits squashed |
@bors r+ rollup |
Also going to approve for beta-backport as a small patch that fixes a stable/stable regression. |
…lacrum Use `getuid` to check instead of `USER` env var in rustbuild This makes it consistent with `x.py` as changed in rust-lang#95671 Fixes rust-lang#100459
Failed in rollup: #100931 (comment) |
Hm, that's annoying. My guess is that this is not really relevant outside cfg(unix) because SUDO_USER won't be defined - but maybe Windows also has sudo? Let's try to see what the python getuid() equivalent does on Windows, if anything, and go from there. |
Windows has runas, which is somewhat similar to sudo, but it doesn't set SUDO_USER. |
Alright. Then I think putting a #[cfg(unix)] on the condition is reasonable. |
Python's >>> import os
>>> os.getuid()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'os' has no attribute 'getuid'
In that case, will |
Yes, that would make sense to me. |
This makes it consistent with `x.py` as changed in rust-lang#95671 Fixes rust-lang#100459
I tested on Windows, |
@bors r+ rollup |
…lacrum Use `getuid` to check instead of `USER` env var in rustbuild This makes it consistent with `x.py` as changed in rust-lang#95671 Fixes rust-lang#100459
…lacrum Use `getuid` to check instead of `USER` env var in rustbuild This makes it consistent with `x.py` as changed in rust-lang#95671 Fixes rust-lang#100459
…iaskrgr Rollup of 14 pull requests Successful merges: - rust-lang#94467 (Add `special_module_name` lint) - rust-lang#100852 (Use `getuid` to check instead of `USER` env var in rustbuild) - rust-lang#101072 (bootstrap: Add llvm-has-rust-patches target option) - rust-lang#101190 (Make docs formulation more consistent for NonZero{int}) - rust-lang#101245 (Remove unneeded where whitespace) - rust-lang#101251 (Fix bad target name in Walkthrough) - rust-lang#101254 (rustdoc: remove unused `.docblock .impl-items` CSS) - rust-lang#101256 (Fixes/adjustments to Fuchsia doc walkthrough) - rust-lang#101270 (Update outdated comment about output capturing in print_to.) - rust-lang#101271 (Fix filename of armv4t-none-eabi.md) - rust-lang#101274 (Fix typo in comment) - rust-lang#101279 (Fix doc_auto_cfg for impl blocks in different modules with different `cfg`) - rust-lang#101285 (Do not suggest adding `move` to closure when `move` is already used) - rust-lang#101292 (rustdoc: remove unneeded CSS `.content table td:first-child > a`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
[stable] Prepare 1.64.0 release This PR prepares the 1.64.0 stable release builds. In addition to bumping the channel and including the latest release notes changes, this PR also backports the following PRs: * rust-lang#100852 * rust-lang#101366 * rust-lang#101468 * rust-lang#101922 This PR also reverts the following PRs, as decided in rust-lang#101899 (comment): * rust-lang#95295 * rust-lang#99136 (followup to the previous PR) r? `@ghost` cc `@rust-lang/release`
This makes it consistent with
x.py
as changed in #95671Fixes #100459