with current_dir
This commit is contained in:
parent
e91508cf05
commit
a94a3bdd8f
@ -1,4 +1,4 @@
|
|||||||
use std::{path::PathBuf, process::Command};
|
use std::{env::current_dir, path::PathBuf, process::Command};
|
||||||
|
|
||||||
use crate::cli::CuddleVariable;
|
use crate::cli::CuddleVariable;
|
||||||
|
|
||||||
@ -32,7 +32,11 @@ Starting running shell action: {}
|
|||||||
return Err(anyhow::anyhow!("file not found aborting"));
|
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)
|
let mut process = Command::new(path)
|
||||||
|
.current_dir(current_dir)
|
||||||
.envs(variables.iter().map(|v| {
|
.envs(variables.iter().map(|v| {
|
||||||
log::trace!("{:?}", v);
|
log::trace!("{:?}", v);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user