Skip to content

Commit 78ee815

Browse files
committed
stop using brew services to start service
Signed-off-by: Lee Briggs <lee@leebriggs.co.uk>
1 parent e6c0109 commit 78ee815

4 files changed

Lines changed: 16 additions & 29 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ jobs:
167167
run: |
168168
if [ "${{ matrix.install-type }}" = "brew" ]; then
169169
brew list --formula tailscale
170-
brew services list | grep -E '^tailscale[[:space:]]+started'
170+
sudo -E tailscale status
171171
elif [ "${{ matrix.install-type }}" = "source" ]; then
172172
if brew --version >/dev/null 2>&1; then
173173
echo "brew should have been unavailable for source install test"

dist/index.js

Lines changed: 2 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -792,18 +792,8 @@ async function startTailscaleDaemon(
792792
config: TailscaleConfig,
793793
installedWith: installMethod
794794
): Promise<void> {
795-
const runnerOS = process.env.RUNNER_OS || "";
796-
797-
if (runnerOS === runnerMacOS && installedWith === "brew") {
798-
core.info("Starting tailscaled daemon with Homebrew services...");
799-
await execSilent("start tailscale homebrew service", "brew", [
800-
"services",
801-
"start",
802-
cmdTailscale,
803-
]);
804-
await waitForDaemonReady();
805-
core.info("✅ tailscaled daemon is up and running!");
806-
return;
795+
if (installedWith === "brew") {
796+
core.info("Starting Homebrew-installed tailscaled daemon manually...");
807797
}
808798

809799
// Manual daemon start

test/macos-homebrew.test.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,13 @@ test("Homebrew-owned installs are not saved to the action cache", () => {
4343
);
4444
});
4545

46-
test("Homebrew installs start tailscaled through brew services", () => {
47-
assert.match(source, /runnerOS === runnerMacOS && installedWith === "brew"/);
48-
assert.match(source, /"brew",\s*\[\s*"services",\s*"start",\s*cmdTailscale/);
49-
assert.doesNotMatch(source, /"sudo",\s*\[\s*"brew",\s*"services"/);
46+
test("Homebrew installs start tailscaled with the manual daemon path", () => {
47+
assert.match(
48+
source,
49+
/Starting Homebrew-installed tailscaled daemon manually/
50+
);
51+
assert.match(source, /spawn\("sudo", \["-E", cmdTailscaled, \.\.\.args\]/);
52+
assert.doesNotMatch(source, /"brew",\s*\[\s*"services",\s*"start"/);
5053
});
5154

5255
test("bundled action includes the macOS Homebrew smoke path", () => {
@@ -58,5 +61,8 @@ test("bundled action includes the macOS Homebrew smoke path", () => {
5861
bundled,
5962
/Installing Tailscale \$\{config\.resolvedVersion\} via Homebrew/
6063
);
61-
assert.match(bundled, /start tailscale homebrew service/);
64+
assert.match(
65+
bundled,
66+
/Starting Homebrew-installed tailscaled daemon manually/
67+
);
6268
});

0 commit comments

Comments
 (0)