Skip to content

Commit ec3f85a

Browse files
committed
fix: Add postflight hook to automatically remove macOS quarantine attributes and update caveats.
1 parent d338bdf commit ec3f85a

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

Casks/cockpit-tools.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010

1111
auto_updates true
1212

13+
postflight do
14+
system_command "/usr/bin/xattr",
15+
args: ["-cr", "#{appdir}/Cockpit Tools.app"],
16+
sudo: true
17+
end
18+
1319
app "Cockpit Tools.app"
1420

1521
zap trash: [
@@ -20,10 +26,8 @@
2026
]
2127

2228
caveats <<~EOS
23-
If you encounter the "App is damaged" error, please run:
29+
The app is automatically quarantined by macOS. A postflight hook has been added to remove this quarantine.
30+
If you still encounter the "App is damaged" error, please run:
2431
sudo xattr -rd com.apple.quarantine "/Applications/Cockpit Tools.app"
25-
26-
Or install with the --no-quarantine flag:
27-
brew install --cask --no-quarantine cockpit-tools
2832
EOS
2933
end

0 commit comments

Comments
 (0)