Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix(cli): remove sync --install-cron help text — no handler ever existed (#2795) (#2972)

Masa9f7244a77f1f
diff --git a/src/cli.ts b/src/cli.ts
index 154f449b1c..a23881671b 100755
--- a/src/cli.ts
+++ b/src/cli.ts
@@ -2289,7 +2289,7 @@ IMPORT/EXPORT
import <dir> [--no-embed] Import markdown directory
sync [--repo <path>] [flags] Git-to-brain incremental sync
sync --watch [--interval N] Continuous sync (loops until stopped)
- sync --install-cron Install persistent sync daemon
+ See also: autopilot --install (continuous daemon).
export [--dir ./out/] Export to markdown
export --restore-only [--repo <p>] Restore missing supabase-only files
[--type T] [--slug-prefix S] With optional filters
diff --git a/test/cli-help-discoverability.test.ts b/test/cli-help-discoverability.test.ts
index 451c5821bf..3a00b39d6d 100644
--- a/test/cli-help-discoverability.test.ts
+++ b/test/cli-help-discoverability.test.ts
@@ -98,6 +98,33 @@ describe('WARN-6 — main `gbrain --help` lists capture/brainstorm/lsd', () => {
});
});
+describe('#2795 — `sync --install-cron` help line no longer promises an unbuilt feature', () => {
+ test('main `gbrain --help` does not advertise install-cron', () => {
+ // Pre-fix: `sync --install-cron Install persistent sync daemon` was
+ // listed in the top-level help with no flag parsing or handler behind
+ // it anywhere in src/commands/sync.ts — `gbrain sync --install-cron`
+ // silently ran an ordinary sync instead of installing anything.
+ const { stdout, status } = runCli(['--help']);
+ expect(status).toBe(0);
+ expect(stdout).not.toContain('install-cron');
+ expect(stdout).not.toContain('Install persistent sync daemon');
+ });
+
+ test('main `gbrain --help` points sync users at the real continuous-daemon command', () => {
+ const { stdout } = runCli(['--help']);
+ // autopilot --install already runs sync+extract+embed on a schedule
+ // (docs/architecture/KEY_FILES.md); point discoverability there instead
+ // of promising a separate sync-only cron installer that never existed.
+ expect(stdout).toMatch(/sync --watch \[--interval N\][^\n]*\n\s*See also: autopilot --install/);
+ });
+
+ test('`gbrain sync --help` never listed install-cron either', () => {
+ const { stdout, status } = runCli(['sync', '--help']);
+ expect(status).toBe(0);
+ expect(stdout).not.toContain('install-cron');
+ });
+});
+
describe('#1175 — main `gbrain --help` SOURCES block matches the real subcommand set', () => {
test('archive and its lifecycle siblings are listed', () => {
const { stdout, status } = runCli(['--help']);