From ca96f60360a364d3c1f88aaf7c64d356075004d5 Mon Sep 17 00:00:00 2001 From: Tom Bereknyei Date: Wed, 5 Jun 2024 13:50:08 -0400 Subject: [PATCH] chore(flox): Move removal of nix cache to zap section Previously, during upgrades, users of flox would end up in a broken state since all of the flox caches relied upon caches in the nix store to work properly. This meant that we'd have symlinks pointing to nothing after upgrades in many scenarios. This changes moves removal of the nix store to be grouped with the other caches and thus accessible through zap. In the event a future feature of homebrew cask has distinct upgrade options, we'd revisit this to be cleaner. Signed-off-by: Michael Stahnke --- Casks/f/flox.rb | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/Casks/f/flox.rb b/Casks/f/flox.rb index c568349d25a11..fc9e784ff6aa9 100644 --- a/Casks/f/flox.rb +++ b/Casks/f/flox.rb @@ -26,22 +26,23 @@ sudo: true, must_succeed: false, }, - launchctl: [ - "org.nixos.darwin-store", - "org.nixos.nix-daemon", - ], - quit: [ - "org.nixos.darwin-store", - "org.nixos.nix-daemon", - ], - script: { - executable: "/usr/local/share/flox/scripts/uninstall", - sudo: true, - }, - pkgutil: "com.floxdev.flox" + delete: "/usr/local/bin/flox" - zap trash: [ - "~/.cache/flox", - "~/.config/flox", - ] + zap launchctl: [ + "org.nixos.darwin-store", + "org.nixos.nix-daemon", + ], + quit: [ + "org.nixos.darwin-store", + "org.nixos.nix-daemon", + ], + script: { + executable: "/usr/local/share/flox/scripts/uninstall", + sudo: true, + }, + pkgutil: "com.floxdev.flox", + trash: [ + "~/.cache/flox", + "~/.config/flox", + ] end