Skip to content

fix(install): detect macOS GUI Tailscale.app - #102

Merged
joelteply merged 1 commit into
canaryfrom
fix/install-tailscale-mac-detection
Apr 25, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/install-tailscale-mac-detection

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

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

  • Verified `tailscale_present()` returns 0 on Mac with GUI Tailscale.app installed
  • Joel re-runs `curl ... install.sh | bash` — no sudo prompt

🤖 Generated with Claude Code

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]>
Copilot AI review requested due to automatic review settings April 25, 2026 20:51
@joelteply
joelteply merged commit bcd7757 into canary Apr 25, 2026
2 checks passed
@joelteply
joelteply deleted the fix/install-tailscale-mac-detection branch April 25, 2026 20:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 when tailscale_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 thread install.sh
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

Copilot AI Apr 25, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copilot uses AI. Check for mistakes.
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.

2 participants