{"record":{"id":"2c39492bd86289ec","repo":"Homebrew/homebrew-cask","slug":"unable-to-forcibly-close-gamemaker-app","errorCode":null,"errorMessage":"Unable to forcibly close GameMaker.app","messagePattern":"Unable to forcibly close GameMaker\\.app","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"Casks/g/gamemaker.rb","lineNumber":33,"sourceCode":"\n  depends_on :macos\n\n  pkg \"GameMaker-#{version}.pkg\"\n\n  postflight_steps do\n    # Description: Ensure console variant of postinstall is non-interactive.\n    # This is because `open \"$APP_PATH\"&` is called from the postinstall\n    # script of the package and we don't want any user intervention there.\n    terminate_process(\n      \"/Applications/GameMaker.app\",\n      match:           :full,\n      attempts:        3,\n      must_succeed:    false,\n      notices:         [\n        \"The GameMaker package postinstall script launches the GameMaker app\",\n        \"Attempting to close com.yoyogames.gms2 to avoid unwanted user intervention\",\n      ],\n      failure_message: \"Unable to forcibly close GameMaker.app\",\n    )\n  end\n\n  uninstall pkgutil: \"com.yoyogames.gms2\",\n            delete:  \"/Applications/GameMaker.app\"\n\n  zap trash: \"/Users/Shared/GameMakerStudio2\"\nend\n","sourceCodeStart":15,"sourceCodeEnd":42,"githubUrl":"https://github.com/Homebrew/homebrew-cask/blob/8587086220f4568daf43b90d1a0baf391e930c9e/Casks/g/gamemaker.rb#L15-L42","documentation":"Printed by the terminate_process step in gamemaker's postflight_steps (Casks/g/gamemaker.rb:33). The GameMaker .pkg postinstall auto-launches the app with `open \"$APP_PATH\"&`; Homebrew then runs `/usr/bin/pkill -f /Applications/GameMaker.app` up to 3 times, 1 second apart, to suppress the GUI. pkill exits non-zero when no running process's full command line contains /Applications/GameMaker.app (or the signal is denied); after the final attempt Homebrew prints this failure_message as a `Warning:`. Because `must_succeed: false` is set, the step can never fail the install.","triggerScenarios":"`brew install|upgrade|reinstall --cask gamemaker` where all three pkill attempts find no match: the app was never launched (no GUI session for postinstall's `open`, or the pkg stopped auto-opening), the launch outlasted the ~3s retry window, or a running copy executes from a different path (renamed bundle, ~/Applications install). The warning then appears and installation continues.","commonSituations":"Headless/SSH or CI installs; vendor renames GameMaker.app or changes its install location in a pkg revision; user already quit the app before the retry loop sampled it; IDE slow start losing the race.","solutions":["If brew finished, ignore the warning — it is advisory (`must_succeed: false`); just quit any leftover IDE with `pkill -f /Applications/GameMaker.app`.","Quit GameMaker first (`osascript -e 'quit app \"GameMaker\"'`), then re-run `brew reinstall --cask gamemaker`.","Confirm success with `brew list --cask --versions gamemaker`.","If a process is running but under another path (`pgrep -fl GameMaker`), fix the literal path in the cask (`brew edit --cask gamemaker`) and open a PR."],"exampleFix":"# before\nbrew upgrade --cask gamemaker\n# Warning: Unable to forcibly close GameMaker.app\n\n# after: quit the IDE first, then upgrade\nosascript -e 'quit app \"GameMaker\"' || pkill -f '/Applications/GameMaker.app'\nbrew upgrade --cask gamemaker","handlingStrategy":"validation","validationCode":"# Quit the IDE before brew install/upgrade --cask gamemaker:\nosascript -e 'quit app \"GameMaker\"' 2>/dev/null || pkill -f '/Applications/GameMaker.app' 2>/dev/null || true\nbrew reinstall --cask gamemaker","typeGuard":null,"tryCatchPattern":"begin\n  Homebrew::SystemCommand.run!(\"/usr/bin/pkill\", args: [\"-f\", \"/Applications/GameMaker.app\"])\nrescue ErrorDuringExecution\n  # No matching process: the app was not running. Non-fatal by design.\n  warn \"Unable to forcibly close GameMaker.app\"\nend","preventionTips":["Quit GameMaker before brew operations on the cask.","Treat the warning as informational (must_succeed: false); check `brew list --cask gamemaker` for actual status.","When maintaining the cask, keep the terminate_process literal in sync with the bundle path the pkg installs.","On GUI-less macs expect the warning; act on brew's exit code, not the warning text."],"tags":["homebrew","cask","macos","gamemaker","pkill","process-termination","postflight"],"backgroundTag":"pkill-no-process-matched","analyzedSha":"8587086220f4568daf43b90d1a0baf391e930c9e","analyzedAt":"2026-08-21T15:13:24.144Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}