diff options
-rw-r--r-- | subplotlib/src/steplibrary/runcmd.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/subplotlib/src/steplibrary/runcmd.rs b/subplotlib/src/steplibrary/runcmd.rs index 2bf8c56..f42df6e 100644 --- a/subplotlib/src/steplibrary/runcmd.rs +++ b/subplotlib/src/steplibrary/runcmd.rs @@ -150,8 +150,14 @@ pub fn try_to_run_in(context: &ScenarioContext, dirname: &str, argv0: &str, args let path = context.with( |runcmd: &Runcmd| { Ok(env::join_paths( - env::split_paths(curpath.as_deref().unwrap_or_else(|| OsStr::new(""))) - .chain(runcmd.paths.iter().rev().map(PathBuf::from)), + runcmd + .paths + .iter() + .rev() + .map(PathBuf::from) + .chain(env::split_paths( + curpath.as_deref().unwrap_or_else(|| OsStr::new("")), + )), )?) }, false, |