Skip to content

Commit 48c520e

Browse files
authored
Merge pull request #204915 from diasonti/charles4
charles@4 4.6.7 (new cask)
2 parents 2dd3e1a + 72f3898 commit 48c520e

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

Casks/c/[email protected]

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
cask "charles@4" do
2+
version "4.6.7"
3+
sha256 "ba16148c7a6b3723488cc95968d96fba1de0807ad8e47467a2b5ac3ad13ff22b"
4+
5+
url "https://www.charlesproxy.com/assets/release/#{version}/charles-proxy-#{version}.dmg"
6+
name "Charles"
7+
desc "Web debugging Proxy application"
8+
homepage "https://www.charlesproxy.com/"
9+
10+
livecheck do
11+
url "https://www.charlesproxy.com/documentation/version-history/"
12+
regex(/Version (4(?:\.\d+)+)/i)
13+
end
14+
15+
app "Charles.app"
16+
17+
uninstall_postflight do
18+
stdout, * = system_command "/usr/bin/security",
19+
args: ["find-certificate", "-a", "-c", "Charles", "-Z"],
20+
sudo: true
21+
hashes = stdout.lines.grep(/^SHA-256 hash:/) { |l| l.split(":").second.strip }
22+
hashes.each do |h|
23+
system_command "/usr/bin/security",
24+
args: ["delete-certificate", "-Z", h],
25+
sudo: true
26+
end
27+
end
28+
29+
uninstall launchctl: "com.xk72.Charles.ProxyHelper",
30+
quit: "com.xk72.Charles",
31+
delete: "/Library/PrivilegedHelperTools/com.xk72.Charles.ProxyHelper"
32+
33+
zap trash: [
34+
"~/Library/Application Support/Charles",
35+
"~/Library/Preferences/com.xk72.charles.config",
36+
"~/Library/Preferences/com.xk72.Charles.plist",
37+
"~/Library/Saved Application State/com.xk72.Charles.savedState",
38+
]
39+
40+
caveats do
41+
requires_rosetta
42+
end
43+
end

0 commit comments

Comments
 (0)