fix(docs): update command syntax from '--' to single argument format for start, stop and status. (#1086)

This commit is contained in:
Michael
2026-01-15 12:43:07 +08:00
committed by GitHub
parent 9e639da5ba
commit b9d2799d29
19 changed files with 54 additions and 54 deletions

View File

@@ -153,7 +153,7 @@ Run 'bd daemon --help' to see all subcommands.`,
// If we can check version and it's compatible, exit
if healthErr == nil && health.Compatible {
fmt.Fprintf(os.Stderr, "Error: daemon already running (PID %d, version %s)\n", pid, health.Version)
fmt.Fprintf(os.Stderr, "Use 'bd daemon --stop' to stop it first\n")
fmt.Fprintf(os.Stderr, "Use 'bd daemon stop' to stop it first\n")
os.Exit(1)
}
@@ -167,7 +167,7 @@ Run 'bd daemon --help' to see all subcommands.`,
} else {
// Can't check version - assume incompatible
fmt.Fprintf(os.Stderr, "Error: daemon already running (PID %d)\n", pid)
fmt.Fprintf(os.Stderr, "Use 'bd daemon --stop' to stop it first\n")
fmt.Fprintf(os.Stderr, "Use 'bd daemon stop' to stop it first\n")
os.Exit(1)
}
}

View File

@@ -495,13 +495,13 @@ func getSocketPath() string {
func emitVerboseWarning() {
switch daemonStatus.FallbackReason {
case FallbackConnectFailed:
fmt.Fprintf(os.Stderr, "Warning: Daemon unreachable at %s. Running in direct mode. Hint: bd daemon --status\n", daemonStatus.SocketPath)
fmt.Fprintf(os.Stderr, "Warning: Daemon unreachable at %s. Running in direct mode. Hint: bd daemon status\n", daemonStatus.SocketPath)
case FallbackHealthFailed:
fmt.Fprintf(os.Stderr, "Warning: Daemon unhealthy. Falling back to direct mode. Hint: bd daemon --health\n")
case FallbackAutoStartDisabled:
fmt.Fprintf(os.Stderr, "Warning: Auto-start disabled (BEADS_AUTO_START_DAEMON=false). Running in direct mode. Hint: bd daemon\n")
case FallbackAutoStartFailed:
fmt.Fprintf(os.Stderr, "Warning: Failed to auto-start daemon. Running in direct mode. Hint: bd daemon --status\n")
fmt.Fprintf(os.Stderr, "Warning: Failed to auto-start daemon. Running in direct mode. Hint: bd daemon status\n")
case FallbackDaemonUnsupported:
fmt.Fprintf(os.Stderr, "Warning: Daemon does not support this command yet. Running in direct mode. Hint: update daemon or use local mode.\n")
case FallbackWorktreeSafety:

View File

@@ -235,7 +235,7 @@ func CheckDaemonAutoSync(path string) DoctorCheck {
Status: StatusWarning,
Message: fmt.Sprintf("Daemon running without %v (slows agent workflows)", missing),
Detail: "With sync-branch configured, auto-commit and auto-push should be enabled",
Fix: "Restart daemon: bd daemon --stop && bd daemon --start",
Fix: "Restart daemon: bd daemon stop && bd daemon start",
}
}

View File

@@ -160,9 +160,9 @@ func stopRepoDaemon(repoRoot string) {
return // no daemon running
}
// Shell out to bd daemon --stop. We can't call the daemon functions directly
// Shell out to bd daemon stop. We can't call the daemon functions directly
// from TestMain because they have complex dependencies. Using exec is cleaner.
cmd := exec.Command("bd", "daemon", "--stop")
cmd := exec.Command("bd", "daemon", "stop")
cmd.Dir = repoRoot
cmd.Env = append(os.Environ(), "BEADS_DIR="+beadsDir)