mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
uninstaller: continue if removing channel fails and make nix-daemon reload more robust
Kind of a workaround, but failing to remove the channel isn't a big deal.
This commit is contained in:
parent
75add386d3
commit
803bf18141
1 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ with lib;
|
|||
fi
|
||||
|
||||
if test -L ~/.nix-defexpr/channels/darwin; then
|
||||
nix-channel --remove darwin
|
||||
nix-channel --remove darwin || true
|
||||
fi
|
||||
'';
|
||||
|
||||
|
@ -31,7 +31,7 @@ with lib;
|
|||
if test -O /nix/store; then
|
||||
l=$(readlink /Library/LaunchDaemons/org.nixos.nix-daemon.plist) || true
|
||||
if test "$l" != "/nix/var/nix/profiles/default/Library/LaunchDaemons/org.nixos.nix-daemon.plist"; then
|
||||
sudo launchctl unload -w /Library/LaunchDaemons/org.nixos.nix-daemon.plist 2> /dev/null || true
|
||||
sudo launchctl remove org.nixos.nix-daemon 2> /dev/null || true
|
||||
sudo ln -sfn /nix/var/nix/profiles/default/Library/LaunchDaemons/org.nixos.nix-daemon.plist /Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
sudo launchctl load -w /Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue