Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

graff update: reject --force + --check as mutually exclusive

Pranav P7f83d6e6d3a2
diff --git a/src/main.zig b/src/main.zig
index 03ddb995..f7ab1ed1 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -3764,6 +3764,10 @@ pub fn main(init: std.process.Init) !void {
// release. Version-checked (skips if already current), reuses install.sh
// for the actual download/codesign/atomic swap. Exits after.
if (positionals.items.len > 0 and std.mem.eql(u8, positionals.items[0], "update")) {
+ // --check never installs, so --force has no effect on it — reject the
+ // contradictory combination up front rather than silently ignoring one.
+ if (update_force and update_check)
+ std.process.fatal("--force and --check are mutually exclusive — use `graff update` (without --check) to install", .{});
try updateCommand(io, gpa, arena, init.environ_map, update_force, update_check);
return;
}