Skip to content

Commit

Permalink
chore(flox): Move removal of nix cache to zap section
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Tom Bereknyei authored and stahnma committed Jun 6, 2024
1 parent bd8df19 commit ca96f60
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions Casks/f/flox.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ca96f60

Please sign in to comment.