fix: fix async database locking and diff process order

Co-authored-by: aider (openai/andrew/openrouter/google/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-08-25 12:59:04 -03:00
parent afe23aaa40
commit a1bcba5cb1
2 changed files with 16 additions and 8 deletions

View File

@@ -383,7 +383,10 @@ pub fn mode_diff(
log::debug!("MAIN: Done waiting on input-writer threads.");
// Now that all input has been sent and input pipes will be closed by threads exiting,
// Now that all input has been sent, the diff process will run to completion.
// We can read its output. This will block until the process is finished.
let (stdout_capture_result, stderr_capture_result) = execute_diff_command(&mut child_process)?;
// wait for the diff child process to terminate.
log::debug!("MAIN: Waiting for diff child process to finish...");
let diff_status = child_process
@@ -394,7 +397,6 @@ pub fn mode_diff(
diff_status
);
let (stdout_capture_result, stderr_capture_result) = execute_diff_command(&mut child_process)?;
handle_diff_output(diff_status, stdout_capture_result, stderr_capture_result)?;
Ok(())