fix: recommend 'gt daemon start' instead of invalid 'gt daemon init'

The gt doctor patrol-hooks-wired check was recommending 'gt daemon init'
which doesn't exist. The daemon is auto-initialized when running
'gt daemon start', so that's the correct command to recommend.

Fixes #94

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Olivier Debeuf De Rijcker
2026-01-04 12:14:49 +01:00
parent 386dbf85fb
commit 26d696cdc3

View File

@@ -115,7 +115,7 @@ func (c *PatrolMoleculesExistCheck) Fix(ctx *CheckContext) error {
rigPath := filepath.Join(ctx.TownRoot, rigName)
for _, mol := range missing {
desc := getPatrolMoleculeDesc(mol)
cmd := exec.Command("bd", "create",
cmd := exec.Command("bd", "create", //nolint:gosec // G204: args are constructed internally
"--type=molecule",
"--title="+mol,
"--description="+desc,
@@ -167,7 +167,7 @@ func (c *PatrolHooksWiredCheck) Run(ctx *CheckContext) *CheckResult {
Name: c.Name(),
Status: StatusWarning,
Message: "Daemon config not found",
FixHint: "Run 'gt daemon init' to configure daemon",
FixHint: "Run 'gt daemon start' to start the daemon",
}
}
@@ -220,7 +220,7 @@ func (c *PatrolHooksWiredCheck) Run(ctx *CheckContext) *CheckResult {
Name: c.Name(),
Status: StatusWarning,
Message: "Patrol hooks not configured in daemon",
FixHint: "Configure patrols in mayor/daemon.json or run 'gt daemon init'",
FixHint: "Configure patrols in mayor/daemon.json or run 'gt daemon start'",
}
}