diff options
| author | Weihang Lo <weihanglo@users.noreply.github.com> | 2023-08-24 22:53:58 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-24 22:53:58 +0100 |
| commit | 4369e24875e66f43bca7aa71f110b9a0973df50f (patch) | |
| tree | f010a2d19c0e7d720cb2fb7e85ba85d0055335f6 /src/bootstrap/config.rs | |
| parent | f846d7de9985c900f75b6d64a1a38f1301a92c4d (diff) | |
| parent | ec2c95e0932312c994ee8c5d52b7ee93b5ae65b9 (diff) | |
Rollup merge of #115117 - pnkfelix:detect-and-report-nix-shell, r=albertlarsan68
Detect and report nix shell Better diagnostics for people using nix subshell on non-NixOS. 1. Turned patch-binaries-for-nix from a boolean into a ternary flag: true, false, and unset. 2. When patch-binaries-for-nix is unset, we continue with the existing NixOS detection heuristic (look for nixos in /etc/os-release, if present), but if we are not atop NixOS, then issue a note if we see the IN_NIX_SHELL environment variable telling the user to consider setting patch-binaries-for-nix explicitly. Fix #115073
Diffstat (limited to 'src/bootstrap/config.rs')
| -rw-r--r-- | src/bootstrap/config.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 762e66ac7cc..e5fdac3ceda 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -137,7 +137,7 @@ pub struct Config { pub json_output: bool, pub test_compare_mode: bool, pub color: Color, - pub patch_binaries_for_nix: bool, + pub patch_binaries_for_nix: Option<bool>, pub stage0_metadata: Stage0Metadata, pub stdout_is_tty: bool, @@ -1339,7 +1339,7 @@ impl Config { set(&mut config.local_rebuild, build.local_rebuild); set(&mut config.print_step_timings, build.print_step_timings); set(&mut config.print_step_rusage, build.print_step_rusage); - set(&mut config.patch_binaries_for_nix, build.patch_binaries_for_nix); + config.patch_binaries_for_nix = build.patch_binaries_for_nix; config.verbose = cmp::max(config.verbose, flags.verbose as usize); |
