Repository navigation
fix(gateway): detect tailscale in desktop installs - #1248
Merged
Merged
Conversation
This was referenced Nov 24, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 27, 2026
…1339) ## Changes runCli settled only from execFile's callback, and its timeout only sent SIGTERM. A child that ignores SIGTERM, cannot be reaped yet (macOS holds a just-written executable in exec during its first-launch assessment), or has a descendant holding its output kept the promise pending. The Tailscale reading is single flight, so one such call stalled every later refresh. The macOS native check hit this: it hung past its 15 s budget although runCli had a 10 s deadline. runCli now owns the deadline: it sends SIGKILL and resolves a failed result whether or not the exit is reported. The macOS test now links the bundle CLI path to the system shell and keeps its checks in a plain script that shell reads, so it still checks the bundle location, forced CLI mode, the fixed arguments and the empty PATH without launching a new file. A new test shows that a CLI ignoring SIGTERM, with a child holding its output, now fails at the deadline instead of hanging. Related: #1248 Related: #1292 ## Verification - `tests/integration/tailscale-desktop-detection.test.ts` repeated on Linux; the new SIGTERM-ignoring CLI test times out with the old `runCli` and passes with the fix. - Not run on macOS locally: the macOS native check in CI covers it. - Gateway typecheck, oxlint and oxfmt on edited files. Copy audit: no UI text changed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Changes
TAILSCALE_BE_CLI=1only for the child process so the app bundle responds to scripted calls in CLI mode. The gateway can call the bundled CLI without an installed launcher. Tailscale CLI documentationtailscale.exein its standard Program Files install when it is missing from the gateway’sPATH. Tailscale MSI documentationThanks to @marcinniewinski for reporting the detection failure on a macOS gateway without a separate CLI launcher. Connect to Gateway on Windows reads the macOS host’s status. The Windows installation lookup addresses a separate case for gateways running on Windows.
Fixes: #219
Verification
bec02d84e: 48 tests passed viacheck:tmpacross desktop CLI detection, the paired Remote client, Tailscale status, network access, HTTPS and the mobile route hint. The opt-in macOS live test was skipped. The two detection regressions failed before the fix. Gateway typecheck, lint and formatting checks for the edited files passed.bec02d84e. The native detection fixtures passed on Apple Silicon macOS, Intel macOS and Windows x64. On Windows, the paired Remote client read Tailscale status from a gateway fixture over the production pinned TLS transport. CI results