Skip to content

Commit

Permalink
Merge pull request #173061 from setchy/fix/gitify-ensure-app-closed
Browse files Browse the repository at this point in the history
fix(gitify): add preflight steps to reduce errors during `brew upgrade`
  • Loading branch information
miccal committed May 14, 2024
2 parents f45cff7 + 8154bba commit e94b574
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Casks/g/gitify.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@

app "Gitify.app"

preflight do
retries ||= 3
ohai "Attempting to close Gitify.app to avoid unwanted user intervention" if retries >= 3
return unless system_command "/usr/bin/pkill", args: ["-f", "/Applications/Gitify.app"]
rescue RuntimeError
sleep 1
retry unless (retries -= 1).zero?
opoo "Unable to forcibly close Gitify.app"
end

uninstall quit: [
"com.electron.gitify",
"com.electron.gitify.helper",
Expand Down

0 comments on commit e94b574

Please sign in to comment.