Repository navigation
refactor(mcp): ship the tablepro shim in the app bundle - #3372
Merged
Merged
Conversation
Signed-off-by: Dat Ngo Quoc <datlechin@gmail.com>
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.
Why
The command line tool installer wrote
/usr/local/bin/tableproitself, escalating throughosascript ... with administrator privilegeswhen the directory was root-owned. That was the app's only admin escalation.Change
tableproshim ships in the bundle atContents/SharedSupport/bin/tablepro(Contents/MacOScannot hold it: the volume is case-insensitive andTableProis there)./usr/local/bin/tableprolinks to this app and prints the one line to run in Terminal:sudo mkdir -p /usr/local/bin && sudo rm -f /usr/local/bin/tablepro && sudo ln -s <shim> /usr/local/bin/tablepro.rm -ffirst, so an old link to a directory is replaced rather than written into, and a real directory stops the line.PrivilegedShelland the installer.build-release.shfails if the shim is missing from the bundle.Verified
CommandLineShimTestschecks the shim is in the test host's bundle and executable, runs the printed link and unlink lines (withoutsudo) against a temp directory with a quote and a space in the path, over a link to a directory and against a real directory, and reads the status back.Not in this PR
binary "#{appdir}/TablePro.app/Contents/SharedSupport/bin/tablepro".tableproscript installed by an earlier version keeps working; Settings reports it as another file until relinked.Docs: TableProApp/docs#7