Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion apps/staged/src-tauri/src/doctor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,17 @@ fn execute_fix_options(
command_override: Option<String>,
env_vars: Vec<(String, String)>,
) -> ExecuteFixOptions {
// Everything else stays at doctor's defaults: Staged's fixes are
// non-interactive, so nothing here feeds a prompt and the child keeps
// inheriting stdin rather than getting a piped one; the standard fix
// timeout is far above any install or login this runs. Spelled with
// `..Default::default()` so a new doctor option doesn't break this
// workspace-excluded crate, which `cargo check` under `crates/` never
// compiles but `staged-ci.yml` does.
ExecuteFixOptions {
command_override,
npm_registry: crate::managed_acp_tools::npm_registry().map(str::to_string),
env: None,
..Default::default()
}
.with_env_snapshot(env_vars)
}
Expand Down
6 changes: 5 additions & 1 deletion crates/doctor/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ fn clean_up_after_incomplete_wait(child: &mut Child) {
let _ = child.wait();
}

fn kill_child_process_group_or_child(child: &mut Child) {
/// Best-effort kill: target the child's process group first so a shell's whole
/// command tree goes with it, falling back to the direct child when the group
/// lookup fails (the child wasn't spawned with `process_group(0)`, or it isn't
/// Unix). Callers must still reap afterwards.
pub(crate) fn kill_child_process_group_or_child(child: &mut Child) {
if kill_child_process_group(child) {
return;
}
Expand Down
Loading