r-darwish / topgrade

Upgrade everything
GNU General Public License v3.0
3.36k stars 161 forks source link

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

Closed r-darwish closed 2 years ago

r-darwish commented 2 years ago

Fixes #866

Standards checklist:

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 commented 2 years ago

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

SuperSandro2000 commented 2 years ago

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