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:
@@ -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);
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user