Remove the hardcoded agent config binds
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
use std::env;
|
||||
use std::path::PathBuf;
|
||||
|
||||
pub fn agent_rw_paths() -> Vec<PathBuf> {
|
||||
let home = match crate::require_home() {
|
||||
Ok(h) => PathBuf::from(h),
|
||||
Err(_) => return vec![],
|
||||
};
|
||||
|
||||
let candidates = [
|
||||
env::var("CLAUDE_CONFIG_DIR")
|
||||
.map(PathBuf::from)
|
||||
.unwrap_or_else(|_| home.join(".claude")),
|
||||
env::var("CODEX_HOME")
|
||||
.map(PathBuf::from)
|
||||
.unwrap_or_else(|_| home.join(".codex")),
|
||||
home.join(".pi"),
|
||||
home.join(".claude.json"),
|
||||
];
|
||||
|
||||
candidates.into_iter().filter(|p| p.exists()).collect()
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
mod agents;
|
||||
mod blacklist;
|
||||
pub mod cli;
|
||||
pub mod config;
|
||||
|
||||
@@ -3,7 +3,6 @@ use std::os::unix::process::CommandExt;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::{Child, Command};
|
||||
|
||||
use crate::agents;
|
||||
use crate::blacklist;
|
||||
use crate::env;
|
||||
use crate::persistent_tmp::PersistentTmpDirs;
|
||||
@@ -69,10 +68,6 @@ fn build_command(
|
||||
};
|
||||
let command_line = BwrapCommandLine::add_to(&mut cmd)?;
|
||||
|
||||
for path in agents::agent_rw_paths() {
|
||||
cmd.arg("--bind-try").arg(&path).arg(&path);
|
||||
}
|
||||
|
||||
for spec in &config.extra_ro {
|
||||
add_ro_bind(&mut cmd, spec)?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user