Summary
memtrace start --help does not print usage. It runs start: the daemon comes up and keeps running, exactly as if --help were not there. Top-level memtrace --help prints help fine, so the flag is just not honored once a subcommand is present. Other subcommands look affected the same way.
Steps to reproduce
- Have a daemon already running for some data dir.
- Run
memtrace start --help.
Expected: usage text for start, then exit, with no runtime change.
Actual: the daemon starts and keeps running, and the process does not exit. A daemon I already had running for that data dir was disrupted in the process.
Impact
Reaching for --help to learn a subcommand's flags is how most people discover a CLI. Here it has a side effect. On a machine that already had a daemon running, start --help disrupted it and started up again, mid-session. A read-only "what are the flags" gesture should never change runtime state, and it definitely should not disturb a daemon that was already running.
Environment
memtrace 0.6.46, macOS arm64.
Suggested fix
Honor --help and -h for subcommands the same way the top-level command does: print usage and exit, before anything starts. Today the flag only works at the top level.
Summary
memtrace start --helpdoes not print usage. It runsstart: the daemon comes up and keeps running, exactly as if--helpwere not there. Top-levelmemtrace --helpprints help fine, so the flag is just not honored once a subcommand is present. Other subcommands look affected the same way.Steps to reproduce
memtrace start --help.Expected: usage text for
start, then exit, with no runtime change.Actual: the daemon starts and keeps running, and the process does not exit. A daemon I already had running for that data dir was disrupted in the process.
Impact
Reaching for
--helpto learn a subcommand's flags is how most people discover a CLI. Here it has a side effect. On a machine that already had a daemon running,start --helpdisrupted it and started up again, mid-session. A read-only "what are the flags" gesture should never change runtime state, and it definitely should not disturb a daemon that was already running.Environment
memtrace 0.6.46, macOS arm64.
Suggested fix
Honor
--helpand-hfor subcommands the same way the top-level command does: print usage and exit, before anything starts. Today the flag only works at the top level.