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.
This commit is contained in:
can1357
2026-05-15 07:10:41 +02:00
parent d4f9b5d497
commit c7b2fec204
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -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<String, String>>) -> Result<bool> {
fn apply_command_env(
shell: &mut BrushShell,
env: Option<&HashMap<String, String>>,
) -> Result<bool> {
let Some(env) = env else {
return Ok(false);
};
+1 -1
View File
@@ -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);
}