Repository navigation
fix(install): detect macOS GUI Tailscale.app - #102
Merged
Merged
Conversation
command -v tailscale fails when Tailscale is installed via the macOS GUI app (/Applications/Tailscale.app) — the GUI doesn't put a CLI on PATH. install.sh then assumed missing + tried brew-cask install, which prompts for sudo and tries to overwrite the user's working install. Add tailscale_present() helper that also checks /Applications/Tailscale.app and the bundled CLI inside the .app. Used by both install_tailscale() (early-return) and the post-prereq check that decides whether to call it. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
Pull request overview
Adjusts install.sh to correctly detect an existing macOS GUI Tailscale installation (Tailscale.app), avoiding an unnecessary Homebrew cask install attempt that can trigger sudo prompts.
Changes:
- Added
tailscale_present()helper to detect Tailscale via PATH and via/Applications/Tailscale.app. - Updated
install_tailscale()to early-exit whentailscale_present()succeeds. - Updated prereq checks to use
tailscale_present()when deciding whether to attempt Tailscale installation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+92
to
+94
| # prompt + kernel extension churn). Check the GUI bundle path too. | ||
| command -v tailscale >/dev/null 2>&1 && return 0 | ||
| [ -d /Applications/Tailscale.app ] && return 0 |
There was a problem hiding this comment.
In tailscale_present, [ -d /Applications/Tailscale.app ] && return 0 makes the subsequent -x .../Contents/MacOS/Tailscale check unreachable, and it also treats a leftover/partial .app directory as “present”. Consider removing the -d check, or checking the executable path first (and only returning 0 when the bundle actually contains the expected binary).
Suggested change
| # prompt + kernel extension churn). Check the GUI bundle path too. | |
| command -v tailscale >/dev/null 2>&1 && return 0 | |
| [ -d /Applications/Tailscale.app ] && return 0 | |
| # prompt + kernel extension churn). Check the GUI bundle executable too. | |
| command -v tailscale >/dev/null 2>&1 && return 0 |
3 of 6 tasks
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
`command -v tailscale` doesn't find macOS GUI Tailscale (the .app at `/Applications/Tailscale.app` ships its CLI inside the bundle, not on PATH). install.sh thought it was missing, tried to brew-cask install over the user's working install, prompting for sudo.
Add `tailscale_present()` helper that checks PATH + the GUI .app bundle. Used by both `install_tailscale()` and the prereq check that decides whether to call it.
Test plan
🤖 Generated with Claude Code