fix: sandbox mode not working
This commit is contained in:
1 parent
d977e01d5d
commit
db7ef65e4a
1 file changed
+5
-5
+5
-5
@@ -63,17 +63,17 @@ impl Acp {
|
||||
pub fn spawn(p: &Profile, worktree: &Path, id: &str) -> Result<Self> {
|
||||
let mut parts = p.hx.split_whitespace();
|
||||
let mut cmd = Command::new(parts.next().context("empty hx command")?);
|
||||
cmd.args(parts)
|
||||
.args(["serve", "--acp", "--cwd"])
|
||||
.arg(worktree)
|
||||
.args(["--session", id]);
|
||||
// sandbox and permission flags are options of the root command, so they go before `serve`
|
||||
// the TUI answers permission requests itself, so yolo only when the profile asks for it explicitly
|
||||
let flags = p.hx_flags();
|
||||
cmd.args(
|
||||
cmd.args(parts).args(
|
||||
flags
|
||||
.iter()
|
||||
.filter(|f| **f != "--yolo" || p.yolo == Some(true)),
|
||||
);
|
||||
cmd.args(["serve", "--acp", "--cwd"])
|
||||
.arg(worktree)
|
||||
.args(["--session", id]);
|
||||
// same cleared environment as the batch runner: orch's secrets never reach the agent
|
||||
cmd.env_clear().envs(hx_env(std::env::vars(), p));
|
||||
if let Some(h) = &p.home {
|
||||
|
||||
Reference in new issue
Block a user