Skip to content

refactor(mcp): ship the tablepro shim in the app bundle - #3372

Merged
datlechin merged 3 commits into
mainfrom
refactor/cli-shim-in-bundle
Oct 12, 2026
Merged

datlechin merged 3 commits into
mainfrom
refactor/cli-shim-in-bundle

Conversation

@datlechin

Copy link
Copy Markdown
Member

Why

The command line tool installer wrote /usr/local/bin/tablepro itself, escalating through osascript ... with administrator privileges when the directory was root-owned. That was the app's only admin escalation.

Change

  • The tablepro shim ships in the bundle at Contents/SharedSupport/bin/tablepro (Contents/MacOS cannot hold it: the volume is case-insensitive and TablePro is there).
  • Settings > General > Command Line shows whether /usr/local/bin/tablepro links 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 -f first, so an old link to a directory is replaced rather than written into, and a real directory stops the line.
  • Deleted PrivilegedShell and the installer. build-release.sh fails if the shim is missing from the bundle.

Verified

CommandLineShimTests checks the shim is in the test host's bundle and executable, runs the printed link and unlink lines (without sudo) 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

  • The Homebrew cask can add binary "#{appdir}/TablePro.app/Contents/SharedSupport/bin/tablepro".
  • A tablepro script installed by an earlier version keeps working; Settings reports it as another file until relinked.

Docs: TableProApp/docs#7

Signed-off-by: Dat Ngo Quoc <datlechin@gmail.com>
@datlechin
datlechin merged commit d6bd3f8 into main Oct 12, 2026
7 of 10 checks passed
@datlechin
datlechin deleted the refactor/cli-shim-in-bundle branch October 12, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant