cask "microsoft-edge" do version "138.0.3351.65,872e4b54-2592-4a5d-b07e-a7003d07b1c6" sha256 "ac470a66fdd6d588a6ed4e7b61e47d4e1718dca35721c0ae33fb8ee9ce7c29c7" url "https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/#{version.csv.second}/MicrosoftEdge-#{version.csv.first}.dmg" name "Microsoft Edge" desc "Multi-platform web browser" homepage "https://www.microsoft.com/en-us/edge?form=" livecheck do url "https://go.microsoft.com/fwlink/?linkid=2192091" regex(%r{/([^/]+)/MicrosoftEdge[._-]v?(\d+(?:\.\d+)+)\.dmg}i) strategy :header_match do |headers, regex| match = headers["location"]&.match(regex) next if match.blank? "#{match[2]},#{match[1]}" end end auto_updates true depends_on macos: ">= :big_sur" app "Microsoft Edge.app" uninstall launchctl: "com.microsoft.EdgeUpdater.wake" zap trash: [ "~/Library/Application Scripts/com.microsoft.edgemac.wdgExtension", "~/Library/Application Support/Microsoft Edge", "~/Library/Application Support/Microsoft/EdgeUpdater", "~/Library/Caches/com.microsoft.edgemac", "~/Library/Caches/com.microsoft.EdgeUpdater", "~/Library/Caches/Microsoft Edge", "~/Library/Containers/com.microsoft.edgemac.wdgExtension", "~/Library/HTTPStorages/com.microsoft.edgemac", "~/Library/HTTPStorages/com.microsoft.EdgeUpdater", "~/Library/LaunchAgents/com.microsoft.EdgeUpdater.*.plist", "~/Library/Microsoft/MicrosoftSoftwareUpdate/Actives/com.microsoft.edgemac", "~/Library/Preferences/com.microsoft.edgemac.plist", "~/Library/Saved Application State/com.microsoft.edgemac.savedState", "~/Library/WebKit/com.microsoft.edgemac", ], rmdir: [ "~/Library/Application Support/Microsoft", "~/Library/Microsoft", ] end