Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Dec 21, 2024
1 parent 0cb597c commit 4289fef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 5 additions & 9 deletions src/cli/run.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::collections::{BTreeMap, };
use std::collections::BTreeMap;
use std::io::Write;
use std::iter::once;
use std::ops::Deref;
Expand Down Expand Up @@ -370,7 +370,9 @@ impl Run {
if let Some(file) = &task.file {
self.exec_file(file, task, &env, &prefix)?;
} else {
for (script, args) in task.render_run_scripts_with_args(self.cd.clone(), &task.args, &env)? {
for (script, args) in
task.render_run_scripts_with_args(self.cd.clone(), &task.args, &env)?
{
self.exec_script(&script, &args, task, &env, &prefix)?;
}
}
Expand Down Expand Up @@ -480,13 +482,7 @@ impl Run {
}
}

fn exec_file(
&self,
file: &Path,
task: &Task,
env: &EnvMap,
prefix: &str,
) -> Result<()> {
fn exec_file(&self, file: &Path, task: &Task, env: &EnvMap, prefix: &str) -> Result<()> {
let config = Config::get();
let mut env = env.clone();
let command = file.to_string_lossy().to_string();
Expand Down
2 changes: 1 addition & 1 deletion src/task/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ impl Task {
.filter(|(_, v)| v.0 == Either::Right(EitherIntOrBool(Either::Right(false))))
.map(|(k, _)| k)
.collect::<HashSet<_>>();

Ok(env
.into_iter()
.filter(|(k, _)| !rm_env.contains(k))
Expand Down

0 comments on commit 4289fef

Please sign in to comment.