brew/Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-script-user-relative.rb
Mike McQuaid 41e94afda5
Fix brew style
Fixes for https://github.com/Homebrew/brew/pull/12152.

Extracted into a separate PR so this can be merged immediately.
2021-09-30 10:13:53 +01:00

22 lines
564 B
Ruby

cask "with-uninstall-script-user-relative" do
version "1.2.3"
sha256 "5633c3a0f2e572cbf021507dec78c50998b398c343232bdfc7e26221d0a5db4d"
url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyApp.zip"
homepage "https://brew.sh/MyFancyApp"
app "MyFancyApp/MyFancyApp.app", target: "~/MyFancyApp.app"
postflight do
File.write "#{ENV["HOME"]}/MyFancyApp.app/uninstall.sh", <<~SH
#!/bin/sh
/bin/rm -r "#{ENV["HOME"]}/MyFancyApp.app"
SH
end
uninstall script: {
executable: "~/MyFancyApp.app/uninstall.sh",
sudo: false,
}
end