Repository navigation
Fix doctor crash and notification status on macOS - #54
Merged
Merged
Conversation
`driga doctor` could crash: an autorelease pool was drained on a different OS thread than the one that created it. Pools now pin their goroutine to the thread until drained. Run through the Homebrew symlink (/opt/homebrew/bin/driga), macOS did not see doctor as Driga.app and it reported "reinstall the app". `doctor` and `collect` now restart from the real executable path when started through a symlink, so macOS identifies them as Driga. Claude-Session: https://claude.ai/code/session_01T2vtcW6ihn1ywy9vxUq9a4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found right after installing v2026.10.13-alpha:
driga doctorrun asDriga.app/Contents/MacOS/driga doctorcrashed with SIGSEGV. The notification-permission check drained an autorelease pool on a different OS thread than the one that created it. Pools now lock the goroutine to its thread until drained./opt/homebrew/bin/driga, macOS doesn't treat the process as Driga.app, so doctor said "reinstall the app".doctorandcollectnow re-exec from the real path when started through a symlink. Other commands, including hooks, are unchanged.The running collector was not affected: launchd starts it by its full path, and it runs these calls on its locked main thread.
Checked: an ad-hoc signed Driga.app, run 10 times via a symlink and 10 times via the full path, reported the status correctly with no crash.
just checkpasses.https://claude.ai/code/session_01T2vtcW6ihn1ywy9vxUq9a4