fix: correct input method installation path in SquirrelApp.appDir - #1161
Open
Wujidadi wants to merge 1 commit into
Open
fix: correct input method installation path in SquirrelApp.appDir#1161Wujidadi wants to merge 1 commit into
Wujidadi wants to merge 1 commit into
Conversation
- SquirrelApp.appDir has read "/Library/Input Library/Squirrel.app" since the Swift migration (ce4f761); the standard location is "/Library/Input Methods/Squirrel.app" - TISRegisterInputSource(appDir) in --register-input-source therefore points at a nonexistent path, so explicit re-registration has been silently broken - The bug went unnoticed because already-enabled installations return early in register(), and on fresh systems macOS auto-discovers apps under /Library/Input Methods without explicit registration
There was a problem hiding this comment.
Pull request overview
This PR fixes a long-standing bug in the Swift-era implementation of SquirrelApp.appDir by correcting the hardcoded input method installation path so that explicit input-source registration targets the actual on-disk location under /Library/Input Methods.
Changes:
- Update
SquirrelApp.appDirfrom/Library/Input Library/Squirrel.appto/Library/Input Methods/Squirrel.appto match the standard macOS input method install location and the project’s installer/Makefile behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Wujidadi
added a commit
to Wujidadi/squirrel
that referenced
this pull request
Jul 25, 2026
- 自 PR rime#1161 分支 cherry-pick(874123c) - appDir 自 Swift 移轉(ce4f761)起誤植為 /Library/Input Library/Squirrel.app,致 --register-input-source 的 TISRegisterInputSource 指向不存在的路徑,顯式重新註冊靜默失效 - 修正為標準路徑 /Library/Input Methods/Squirrel.app,bundle 更換後的重新註冊自此真正可用
Member
|
Good catch! |
lotem
approved these changes
Jul 27, 2026
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.
Problem
SquirrelApp.appDirinsources/Main.swifthas read/Library/Input Library/Squirrel.appsince the Swift migration (ce4f761, #898):The standard input method location is
/Library/Input Methods/Squirrel.app, which is also where the Makefile and the installer actually place the app. As a result,TISRegisterInputSource(SquirrelApp.appDir)in--register-input-sourcepoints at a nonexistent path, so explicit (re-)registration has been silently broken for every Swift-era release.Why it went unnoticed
SquirrelInstaller.register()returns early before ever callingTISRegisterInputSource./Library/Input Methods, so installation still appears to work without explicit registration.The breakage only shows when re-registration actually matters, e.g. re-registering after the app bundle has been replaced by a from-source reinstall.
Fix
Correct the path to
/Library/Input Methods/Squirrel.app.