Fix macOS Tailscale CLI discovery for App Store installs#35
Open
Fix macOS Tailscale CLI discovery for App Store installs#35
Conversation
On macOS, Tailscale installed via the App Store places its CLI at /Applications/Tailscale.app/Contents/MacOS/Tailscale, which is not in PATH. Add find_tailscale_cli() helper that checks PATH first, then falls back to the macOS App Store location on darwin. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ret2libc
approved these changes
Feb 16, 2026
DarkaMaul
reviewed
Feb 16, 2026
Collaborator
DarkaMaul
left a comment
There was a problem hiding this comment.
Sounds great, two nitpicks:
- maybe the tests are a bit too comprehensive here (I flagged the
binary_vanishes) - the missing binary error is not surfaced to the user - we could maybe have a better error message here
Comment on lines
+176
to
+182
| @patch("dropkit.main.find_tailscale_cli", return_value="/usr/bin/tailscale") | ||
| @patch("dropkit.main.subprocess.run") | ||
| def test_tailscale_binary_vanishes(self, mock_run, mock_find): | ||
| """Test race condition: binary found but gone by execution time.""" | ||
| mock_run.side_effect = FileNotFoundError() | ||
| assert check_local_tailscale() is False | ||
|
|
Collaborator
There was a problem hiding this comment.
Maybe that's a bit too much here?
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.
Summary
/Applications/Tailscale.app/Contents/MacOS/Tailscale, which is not in PATHcheck_local_tailscale()was running["tailscale", ...]which fails withFileNotFoundError, incorrectly reporting Tailscale as unavailablefind_tailscale_cli()helper that checks PATH first, then falls back to the macOS App Store location on darwinTest plan
TestFindTailscaleClitests cover: PATH hit, macOS App Store fallback, app not installed, Linux (no fallback), PATH skips fallbackTestCheckLocalTailscaletests to usefind_tailscale_climocktest_tailscale_binary_vanishes)prek runpasses🤖 Generated with Claude Code