Skip to content

Commit

Permalink
Merge pull request #125 from golemfactory/mw/automatic-work-dir
Browse files Browse the repository at this point in the history
Automatic: do not change work dir
  • Loading branch information
mwalkiewicz authored Aug 6, 2024
2 parents f2fa46b + 9c2d26a commit 4624b7a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/process/automatic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl Runtime for Automatic {
fn build_cmd(model: Option<PathBuf>, config: &Config) -> anyhow::Result<Command> {
let script = super::find_file(&config.startup_script)?;

let mut cmd = Command::new(&script);
let mut cmd = Command::new(script);

cmd.args(&config.additional_args);

Expand All @@ -94,11 +94,9 @@ fn build_cmd(model: Option<PathBuf>, config: &Config) -> anyhow::Result<Command>
log::warn!("No model arg");
}

let work_dir = script.parent().unwrap();
cmd.stdout(Stdio::piped())
.stderr(Stdio::piped())
.stdin(Stdio::null())
.current_dir(work_dir);
.stdin(Stdio::null());
Ok(cmd)
}

Expand Down

0 comments on commit 4624b7a

Please sign in to comment.