feat: make cwd a required field of Config so we stop assuming std::env::current_dir() in a session

This commit is contained in:
Michael Bolin
2025-05-04 08:43:49 -07:00
parent 0442458309
commit 15bc38585c
13 changed files with 170 additions and 96 deletions
+2 -1
View File
@@ -5,7 +5,8 @@ pub async fn run_seatbelt(
command: Vec<String>,
sandbox_policy: SandboxPolicy,
) -> anyhow::Result<()> {
let seatbelt_command = create_seatbelt_command(command, &sandbox_policy);
let cwd = std::env::current_dir().expect("failed to get cwd");
let seatbelt_command = create_seatbelt_command(command, &sandbox_policy, &cwd);
let status = tokio::process::Command::new(seatbelt_command[0].clone())
.args(&seatbelt_command[1..])
.spawn()