From c7b2fec2049375bb7edc7ae6c371d3a29b70ba1f Mon Sep 17 00:00:00 2001 From: can1357 Date: Fri, 15 May 2026 07:10:41 +0200 Subject: [PATCH] fix(run-rs-task): always ran fmt:rs regardless of Rust-affecting changes - Exempted the `fmt:rs` task from the early-exit skip logic so formatting always runs. - Reformatted `apply_command_env` signature in shell.rs to satisfy the formatter. --- crates/pi-shell/src/shell.rs | 5 ++++- scripts/run-rs-task.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/pi-shell/src/shell.rs b/crates/pi-shell/src/shell.rs index c8ec9c2cf..55a3dae8a 100644 --- a/crates/pi-shell/src/shell.rs +++ b/crates/pi-shell/src/shell.rs @@ -1045,7 +1045,10 @@ fn terminate_background_jobs(shell: &BrushShell) { /// `Command` scope. Returns `true` when a scope was pushed (so the caller /// can pop it after the command runs), `false` when there were no vars and /// the existing scopes remain untouched. -fn apply_command_env(shell: &mut BrushShell, env: Option<&HashMap>) -> Result { +fn apply_command_env( + shell: &mut BrushShell, + env: Option<&HashMap>, +) -> Result { let Some(env) = env else { return Ok(false); }; diff --git a/scripts/run-rs-task.ts b/scripts/run-rs-task.ts index 2f4e60d1f..3d628cdce 100644 --- a/scripts/run-rs-task.ts +++ b/scripts/run-rs-task.ts @@ -48,7 +48,7 @@ if (!isRustTaskName(taskName)) { process.exit(1); } -if (!(isCI() || (await hasRustAffectingChanges()))) { +if (taskName !== "fmt:rs" && !(isCI() || (await hasRustAffectingChanges()))) { console.log(`Skipping ${taskName} (not in CI and no Rust-affecting changes were found).`); process.exit(0); }