Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Don't try to upgrade nix if it's not a part of a profile #924

Merged
merged 1 commit into from
May 6, 2022

Conversation

r-darwish
Copy link
Owner

Fixes #866

Standards checklist:

  • The PR title is descriptive.
  • The code compiles (cargo build)
  • The code passes rustfmt (cargo fmt)
  • The code passes clippy (cargo clippy)
  • The code passes tests (cargo test)
  • Optional: I have tested the code myself
    • I also tested that Topgrade skips the step where needed

If you developed a feature or a bug fix for someone else and you do not have the
means to test it, please tag this person here.

@r-darwish
Copy link
Owner Author

@korrat, @Lord-Valen, @SuperSandro2000 - Can anyone test this change?

@SuperSandro2000
Copy link
Contributor

I think it works

 2022-05-06T22:37:18.862Z DEBUG topgrade::runner > Step "nix"
 2022-05-06T22:37:18.862Z DEBUG topgrade::utils  > Detected "/home/sandro/.local/bin/nix" as "nix"
 2022-05-06T22:37:18.863Z DEBUG topgrade::utils  > Detected "/home/sandro/.nix-profile/bin/nix-channel" as "nix-channel"
 2022-05-06T22:37:18.863Z DEBUG topgrade::utils  > Detected "/home/sandro/.nix-profile/bin/nix-env" as "nix-env"
 2022-05-06T22:37:18.895Z TRACE topgrade::executor > Output of "/home/sandro/.nix-profile/bin/nix-env" "--query" "nix": Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "error: selector 'nix' matches no derivations\n" }
 2022-05-06T22:37:18.895Z DEBUG topgrade::steps::os::unix > nix-env output: Err(exit status: 1: error: selector 'nix' matches no derivations
)
―― 00:37:18 - Nix ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
 2022-05-06T22:37:18.896Z DEBUG topgrade::steps::os::unix > Multi user nix: false
Dry running: /home/sandro/.nix-profile/bin/nix-channel --update
Dry running: /home/sandro/.nix-profile/bin/nix-env --upgrade
 2022-05-06T22:37:18.896Z DEBUG topgrade::utils           > Path "/home/sandro/.config/emacs" doesn't exist
 2022-05-06T22:37:18.896Z DEBUG topgrade::utils           > Path "/home/sandro/.emacs.d" doesn't exist
 2022-05-06T22:37:18.896Z DEBUG topgrade::steps::git      > /home/sandro/.ideavimrc does not exists
 2022-05-06T22:37:18.896Z DEBUG topgrade::steps::git      > /home/sandro/.intellimacs does not exists
 2022-05-06T22:37:18.896Z DEBUG topgrade::steps::git      > /home/sandro/.zshrc does not exists
 2022-05-06T22:37:18.896Z DEBUG topgrade::steps::git      > /home/sandro/.config/fish does not exists
 2022-05-06T22:37:18.896Z DEBUG topgrade::steps::git      > /home/sandro/.config/openbox does not exists
 2022-05-06T22:37:18.896Z DEBUG topgrade::steps::git      > /home/sandro/.config/bspwm does not exists
 2022-05-06T22:37:18.896Z DEBUG topgrade::steps::git      > /home/sandro/.config/i3 does not exists
 2022-05-06T22:37:18.896Z DEBUG topgrade::steps::git      > /home/sandro/.config/sway does not exists

―― 00:37:18 - Summary ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
nix: OK
 2022-05-06T22:37:18.896Z DEBUG topgrade::terminal        > Desktop notification: Topgrade finished successfully

@r-darwish r-darwish merged commit 84c3a0f into master May 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nix step fails when nix is not part of a Nix profile
2 participants