cask "powershell" do arch arm: "arm64", intel: "x64" version "7.5.2" sha256 arm: "84f095de7ddd62c0b2f1d6dc68efe0b35a0fb90c2fe5127de2b0dd15eab4d95c", intel: "f1795c1cbd441944c05e4136b01b0274d0f080556cc72669a55e127eb429e2a2" url "https://github.com/PowerShell/PowerShell/releases/download/v#{version}/powershell-#{version}-osx-#{arch}.pkg" name "PowerShell" desc "Command-line shell and scripting language" homepage "https://github.com/PowerShell/PowerShell" livecheck do url :url regex(/^v?(\d+(?:\.\d+)+)$/i) end depends_on macos: ">= :mojave" pkg "powershell-#{version}-osx-#{arch}.pkg" uninstall pkgutil: "com.microsoft.powershell" zap trash: [ "~/.cache/powershell", "~/.config/powershell", "~/.local/share/powershell", ] caveats <<~EOS To use Homebrew in PowerShell, run the following in a PowerShell session: New-Item -Path (Split-Path -Parent -Path $PROFILE.CurrentUserAllHosts) -ItemType Directory -Force Add-Content -Path $PROFILE.CurrentUserAllHosts -Value '$(#{HOMEBREW_PREFIX}/bin/brew shellenv) | Invoke-Expression' EOS end