Merge pull request #198803 from Homebrew/bump-wizcli-0.69.0
[Homebrew/homebrew-cask.git] / Casks / l / lightproxy.rb
blob322a93403a5f0be8f94d643b4c109ee0ae4adcca
1 cask "lightproxy" do
2   version "1.1.41"
3   sha256 "e71f606717712eabb06e1cf0c643302f8d52d339d227367a16ca519883d4bd00"
5   url "https://github.com/alibaba/lightproxy/releases/download/v#{version}/LightProxy-#{version}.dmg",
6       verified: "github.com/alibaba/lightproxy/"
7   name "LightProxy"
8   desc "Proxy & Debug tools based on whistle with Chrome Devtools UI"
9   homepage "https://alibaba.github.io/lightproxy/"
11   app "LightProxy.app"
13   uninstall_postflight do
14     stdout, * = system_command "/usr/bin/security",
15                                args: ["find-certificate", "-a", "-c", "LightProxy", "-Z"],
16                                sudo: true
17     hashes = stdout.lines.grep(/^SHA-256 hash:/) { |l| l.split(":").second.strip }
18     hashes.each do |h|
19       system_command "/usr/bin/security",
20                      args: ["delete-certificate", "-Z", h],
21                      sudo: true
22     end
23   end
25   caveats do
26     requires_rosetta
27   end
28 end