diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2faca3d..a1c95b4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -167,7 +167,7 @@ jobs: run: | if [ "${{ matrix.install-type }}" = "brew" ]; then brew list --formula tailscale - brew services list | grep -E '^tailscale[[:space:]]+started' + sudo -E tailscale status elif [ "${{ matrix.install-type }}" = "source" ]; then if brew --version >/dev/null 2>&1; then echo "brew should have been unavailable for source install test" diff --git a/dist/index.js b/dist/index.js index e2f1868..9b647a5 100644 --- a/dist/index.js +++ b/dist/index.js @@ -41707,17 +41707,8 @@ async function installTailscaleFromSourceOnMacOS(config, toolPath) { core.info("✅ Tailscale installed successfully on macOS from source"); } async function startTailscaleDaemon(config, installedWith) { - const runnerOS = process.env.RUNNER_OS || ""; - if (runnerOS === runnerMacOS && installedWith === "brew") { - core.info("Starting tailscaled daemon with Homebrew services..."); - await execSilent("start tailscale homebrew service", "brew", [ - "services", - "start", - cmdTailscale, - ]); - await waitForDaemonReady(); - core.info("✅ tailscaled daemon is up and running!"); - return; + if (installedWith === "brew") { + core.info("Starting Homebrew-installed tailscaled daemon manually..."); } // Manual daemon start const stateArgs = config.stateDir diff --git a/src/main.ts b/src/main.ts index 1f1c9d3..99f1aab 100644 --- a/src/main.ts +++ b/src/main.ts @@ -792,18 +792,8 @@ async function startTailscaleDaemon( config: TailscaleConfig, installedWith: installMethod ): Promise { - const runnerOS = process.env.RUNNER_OS || ""; - - if (runnerOS === runnerMacOS && installedWith === "brew") { - core.info("Starting tailscaled daemon with Homebrew services..."); - await execSilent("start tailscale homebrew service", "brew", [ - "services", - "start", - cmdTailscale, - ]); - await waitForDaemonReady(); - core.info("✅ tailscaled daemon is up and running!"); - return; + if (installedWith === "brew") { + core.info("Starting Homebrew-installed tailscaled daemon manually..."); } // Manual daemon start diff --git a/test/macos-homebrew.test.js b/test/macos-homebrew.test.js index c8d2455..0b41f52 100644 --- a/test/macos-homebrew.test.js +++ b/test/macos-homebrew.test.js @@ -43,10 +43,13 @@ test("Homebrew-owned installs are not saved to the action cache", () => { ); }); -test("Homebrew installs start tailscaled through brew services", () => { - assert.match(source, /runnerOS === runnerMacOS && installedWith === "brew"/); - assert.match(source, /"brew",\s*\[\s*"services",\s*"start",\s*cmdTailscale/); - assert.doesNotMatch(source, /"sudo",\s*\[\s*"brew",\s*"services"/); +test("Homebrew installs start tailscaled with the manual daemon path", () => { + assert.match( + source, + /Starting Homebrew-installed tailscaled daemon manually/ + ); + assert.match(source, /spawn\("sudo", \["-E", cmdTailscaled, \.\.\.args\]/); + assert.doesNotMatch(source, /"brew",\s*\[\s*"services",\s*"start"/); }); test("bundled action includes the macOS Homebrew smoke path", () => { @@ -58,5 +61,8 @@ test("bundled action includes the macOS Homebrew smoke path", () => { bundled, /Installing Tailscale \$\{config\.resolvedVersion\} via Homebrew/ ); - assert.match(bundled, /start tailscale homebrew service/); + assert.match( + bundled, + /Starting Homebrew-installed tailscaled daemon manually/ + ); });