fix(daemon): print usage on bare ccstatusline daemon - #52
Merged
Merged
Conversation
…rting a server Bare `daemon` now prints the usage line and exits 1, matching the unknown-verb branch (issue #51). The detached foreground server host spawned by `daemon start` moves to the new `daemon serve` subcommand. Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #51
Problem
ccstatusline daemonwith no subcommand started the daemon as a foreground server instead of printing usage, unlike every other invalid/missing verb.Change
daemonnow printsusage: ccstatusline daemon [start|stop|status|restart|install|uninstall]to stderr and exits 1, exactly like the unknown-verb branch.daemon startnow uses adaemon servesubcommand (spawnDetachedDaemonargs), so background behavior is unchanged.lifecycle.ts/ccstatusline.tsupdated to reflectdaemon serve.Test
src/daemon/__tests__/daemon-cli.test.ts: pinsargvto a baredaemon, mocksconsole.error/process.exit, and asserts the exact usage line plus a non-zero exit — in-process, so no server can start.Verification
bun test: 2733 pass, 0 fail.bun run lint: clean.🤖 Generated with Claude Code