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-03 13:52:06 -07:00
parent 0442458309
commit 3f73058676
13 changed files with 171 additions and 97 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()