stop using brew services to start service

Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
This commit is contained in:
Lee Briggs 2026-04-26 20:22:11 -07:00
parent e6c0109a1d
commit 78ee815094
No known key found for this signature in database
GPG key ID: A4D09B96FDFEB505
4 changed files with 16 additions and 29 deletions

View file

@ -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"

13
dist/index.js generated vendored
View file

@ -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

View file

@ -792,18 +792,8 @@ async function startTailscaleDaemon(
config: TailscaleConfig,
installedWith: installMethod
): Promise<void> {
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

View file

@ -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/
);
});