fix(docs): update command syntax from '--' to single argument format for start, stop and status. (#1086)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user