From 5d06025a31b7051d79f91f4bdf9b5169ae417cf1 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 19 May 2026 14:49:02 +0000 Subject: [PATCH] fix(daemon): propagate error when daemon binary not found `shelltime daemon reinstall` printed "successfully reinstalled" even when the install step could not locate `shelltime-daemon` (common on Linux without Homebrew/curl-installer). The install handler swallowed the ResolveDaemonBinaryPath error with `return nil`, so the reinstall wrapper treated it as success. Return a wrapped error instead so the reinstall command exits non-zero and skips the green success line, and surface the hint in red. https://claude.ai/code/session_01LBLq3b7dqsgfcSAEmnWDcY --- commands/daemon.install.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/daemon.install.go b/commands/daemon.install.go index 9c47f16..4a6beb1 100644 --- a/commands/daemon.install.go +++ b/commands/daemon.install.go @@ -42,10 +42,10 @@ func commandDaemonInstall(c *cli.Context) error { // Resolve daemon binary (Homebrew/PATH preferred, curl-installer fallback) daemonBinPath, err := model.ResolveDaemonBinaryPath() if err != nil { - color.Yellow.Println("⚠️ shelltime-daemon not found.") + color.Red.Println("❌ shelltime-daemon binary not found.") color.Yellow.Println("Install via Homebrew: brew install shelltime/tap/shelltime") color.Yellow.Println("Or via curl installer: curl -sSL https://shelltime.xyz/i | bash") - return nil + return fmt.Errorf("shelltime-daemon binary not found: %w", err) } color.Green.Printf("✅ Found daemon binary at: %s\n", daemonBinPath)