{"record":{"id":"cd39be51ecdd0cf4","repo":"Homebrew/homebrew-cask","slug":"unable-to-forcibly-close-gamemaker-lts-version-m","errorCode":null,"errorMessage":"Unable to forcibly close GameMaker LTS #{version.major}.app","messagePattern":"Unable to forcibly close GameMaker LTS #(.+?)\\.app","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"Casks/g/gamemaker@lts.rb","lineNumber":32,"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 LTS #{version.major}.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.gm-lts#{version.major} to avoid unwanted user intervention\",\n      ],\n      failure_message: \"Unable to forcibly close GameMaker LTS #{version.major}.app\",\n    )\n  end\n\n  uninstall pkgutil: \"com.yoyogames.gm-lts#{version.major}\",\n            delete:  \"/Applications/GameMaker LTS #{version.major}.app\"\n\n  zap trash: \"/Users/Shared/GameMakerStudio2-LTS#{version.major}\"\nend\n","sourceCodeStart":14,"sourceCodeEnd":41,"githubUrl":"https://github.com/Homebrew/homebrew-cask/blob/8587086220f4568daf43b90d1a0baf391e930c9e/Casks/g/gamemaker@lts.rb#L14-L41","documentation":"Printed by the terminate_process step in gamemaker@lts's postflight_steps (Casks/g/gamemaker@lts.rb:32). The GameMaker LTS .pkg postinstall runs `open \"$APP_PATH\"&`, so Homebrew runs `/usr/bin/pkill -f \"/Applications/GameMaker LTS #{version.major}.app\"` up to 3 times, 1 second apart. Note the interpolated path: the bundle name embeds version.major, so the pattern is only correct while the vendor's install folder still ends with the same major number. pkill exits non-zero when no live process's command line contains the interpolated path; after the last attempt Homebrew prints this failure_message as a `Warning:`, and with `must_succeed: false` the install proceeds.","triggerScenarios":"`brew install|upgrade|reinstall --cask gamemaker@lts` where no process ever matches: app never launched (headless install, postinstall `open` failed), launch took longer than the ~3s window, or — specific to this cask — version.major changed or the vendor renamed the install folder so the interpolated path no longer matches the running executable's command line. Every pkill attempt fails; after the third the warning is shown and installation continues.","commonSituations":"Version bumps where the LTS major (e.g. 2023 → 2024) changes the folder suffix in /Applications; vendor drops the ' LTS <major>' suffix from the bundle name; SSH/CI installs with no GUI; a stale running copy from a previous LTS major under a differently-versioned path.","solutions":["If brew completed, treat the warning as benign (`must_succeed: false`); quit any leftover app with `pkill -f '/Applications/GameMaker LTS'`.","Quit GameMaker LTS before the operation: `osascript -e 'quit app \"GameMaker LTS\"'`, then re-run `brew reinstall --cask gamemaker@lts`.","After any version bump, confirm the installed folder really is `/Applications/GameMaker LTS <version.major>.app` (ls /Applications | grep -i gamemaker); if the vendor renamed it, `brew edit --cask gamemaker@lts` and update the interpolated path, notices and failure_message together, then open a PR.","Check `pgrep -fl GameMaker` to see the real running command line when in doubt.","Maintainers: increase `attempts:` if slow IDE launches regularly outrun the retry window."],"exampleFix":"# before (Casks/g/gamemaker@lts.rb) - pattern breaks when the vendor's folder\n# no longer ends with version.major (e.g. renames to 'GameMaker.app')\nterminate_process \"/Applications/GameMaker LTS #{version.major}.app\",\n  match: :full, attempts: 3, must_succeed: false,\n  failure_message: \"Unable to forcibly close GameMaker LTS #{version.major}.app\"\n\n# after - keep the pattern byte-identical to the path the pkg actually installs\nterminate_process \"/Applications/GameMaker.app\",\n  match: :full, attempts: 3, must_succeed: false,\n  failure_message: \"Unable to forcibly close GameMaker.app\"","handlingStrategy":"validation","validationCode":"# See what is actually running, then quit it before the brew operation:\npgrep -fl '/Applications/GameMaker LTS' || true\nosascript -e 'quit app \"GameMaker LTS\"' 2>/dev/null || true\nbrew reinstall --cask gamemaker@lts","typeGuard":null,"tryCatchPattern":"begin\n  Homebrew::SystemCommand.run!(\"/usr/bin/pkill\",\n    args: [\"-f\", \"/Applications/GameMaker LTS #{version.major}.app\"])\nrescue ErrorDuringExecution\n  # Pattern matched no process: not launched yet, or versioned path is stale.\n  warn \"Unable to forcibly close GameMaker LTS #{version.major}.app\"\nend","preventionTips":["On every version bump, confirm /Applications/GameMaker LTS <version.major>.app still matches the vendor's folder; update the interpolated path, notices and failure_message together.","Quit GameMaker LTS before brew install/upgrade of the cask.","Remember the warning is advisory (must_succeed: false) — verify install success with `brew list --cask gamemaker@lts`.","Use `pgrep -fl GameMaker` to confirm the running command line matches the cask's literal pattern when the warning appears unexpectedly."],"tags":["homebrew","cask","macos","gamemaker","pkill","process-termination","postflight","version-interpolation"],"backgroundTag":"pkill-no-process-matched","analyzedSha":"8587086220f4568daf43b90d1a0baf391e930c9e","analyzedAt":"2026-08-21T15:13:24.144Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}