Skip to content

Commit b0ba8f4

Browse files
committed
fix(makefile): run daemon target from built binary
Switch run-daemon from cargo-run to direct binary execution so Ctrl+C is delivered to the long-lived daemon process reliably. Keep query on cargo run because it is a short-lived command.
1 parent a6dc1ba commit b0ba8f4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,14 @@ ci-compact:
7777
run_step test $(CARGO) test --locked $(CI_VERBOSE_FLAG)
7878

7979
query:
80+
# Query is short-lived, so cargo-run convenience is fine.
8081
$(CARGO) run -- query $(QUERY_ARGS)
8182

8283
run-daemon:
83-
$(CARGO) run -- run-daemon $(RUN_DAEMON_ARGS) --foreground=true --existing-instance=$(RUN_EXISTING_INSTANCE_POLICY)
84+
# Daemon is long-lived and must receive Ctrl+C directly.
85+
# Build first, then run the binary to avoid cargo as an extra signal-handling layer.
86+
$(CARGO) build
87+
"$(CURDIR)/target/debug/openusage-cli" run-daemon $(RUN_DAEMON_ARGS) --foreground=true --existing-instance=$(RUN_EXISTING_INSTANCE_POLICY)
8488

8589
deb:
8690
$(CARGO) deb

0 commit comments

Comments
 (0)