Skip to content

Commit 4219b6a

Browse files
Merge pull request #10179 from gitbutlerapp/fix-calling-hooks
Fix calling hooks
2 parents b434301 + a20e729 commit 4219b6a

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

crates/but-claude/src/bridge.rs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -356,20 +356,21 @@ async fn spawn_command(
356356
command.stderr(write_stderr);
357357
command.current_dir(&project_path);
358358

359-
command.args([
360-
"-p",
361-
"--output-format=stream-json",
362-
"--verbose",
363-
&format!("--settings={settings}"),
364-
&format!("--mcp-config={mcp_config}"),
365-
&format!("--model={}", model.to_cli_string()),
366-
]);
359+
command.args(["--settings", &settings]);
360+
command.args(["--mcp-config", &mcp_config]);
361+
command.args(["--output-format", "stream-json"]);
362+
command.args(["--model", model.to_cli_string()]);
363+
364+
command.args(["-p", "--verbose"]);
367365

368366
if app_settings.claude.dangerously_allow_all_permissions {
369367
command.arg("--dangerously-skip-permissions");
370368
} else {
371-
command.arg("--permission-prompt-tool=mcp__but-security__approval_prompt");
372-
command.arg("--permission-mode=acceptEdits");
369+
command.args([
370+
"--permission-prompt-tool",
371+
"mcp__but-security__approval_prompt",
372+
]);
373+
command.args(["--permission-mode", "acceptEdits"]);
373374
}
374375

375376
let mut session_ids = session.session_ids.clone();
@@ -390,9 +391,9 @@ async fn spawn_command(
390391
}
391392

392393
if let Some(current_id) = current_id {
393-
command.arg(format!("--resume={current_id}"));
394+
command.args(["--resume", &format!("{current_id}")]);
394395
} else {
395-
command.arg(format!("--session-id={}", session.id));
396+
command.args(["--session-id", &format!("{}", session.id)]);
396397
}
397398

398399
command.arg(format_message(&message, thinking_level));

0 commit comments

Comments
 (0)