with current_dir

This commit is contained in:
Kasper Juul Hermansen 2022-08-13 18:09:37 +02:00
parent e91508cf05
commit a94a3bdd8f
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912

View File

@ -1,4 +1,4 @@
use std::{path::PathBuf, process::Command};
use std::{env::current_dir, path::PathBuf, process::Command};
use crate::cli::CuddleVariable;
@ -32,7 +32,11 @@ Starting running shell action: {}
return Err(anyhow::anyhow!("file not found aborting"));
}
let current_dir = current_dir()?;
log::trace!("current executable dir={}", current_dir.to_string_lossy());
let mut process = Command::new(path)
.current_dir(current_dir)
.envs(variables.iter().map(|v| {
log::trace!("{:?}", v);