fix: fix "Nix" step to use nix upgrade-nix in more situations (#550)

`nix upgrade-nix` can be used on any platform except NixOS where `nix`
is available.

Also use `nix profile upgrade --verbose` because the non-verbose mode
doesn't print anything on stdout.
This commit is contained in:
Rebecca Turner
2023-09-17 03:40:04 -04:00
committed by GitHub
parent c1c9fe22df
commit 4dd1c13bd8
3 changed files with 29 additions and 17 deletions

View File

@@ -417,7 +417,7 @@ pub fn run_pip3_update(ctx: &ExecutionContext) -> Result<()> {
Command::new(&python3)
.args(["-m", "pip"])
.output_checked_utf8()
.map_err(|_| SkipStep("pip does not exists".to_string()))?;
.map_err(|_| SkipStep("pip does not exist".to_string()))?;
let check_externally_managed = "import sysconfig; from os import path; print('Y') if path.isfile(path.join(sysconfig.get_path('stdlib'), 'EXTERNALLY-MANAGED')) else print('N')";
Command::new(&python3)