Set explicit PATH in shell container exec
This commit is contained in:
parent
601170e2ab
commit
9b8d4d882e
|
|
@ -206,7 +206,7 @@ export async function claude(workdir: string, opts?: { prompt?: string; print?:
|
|||
export async function shell(workdir?: string): Promise<void> {
|
||||
const args = ["container", "exec", "-it", "--user", USER]
|
||||
if (workdir) args.push("--workdir", containerPath(workdir))
|
||||
args.push(CONTAINER_NAME, "env", "TERM=xterm-256color", "fish", "--login")
|
||||
args.push(CONTAINER_NAME, "env", "TERM=xterm-256color", `PATH=/home/${USER}/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin`, "fish", "--login")
|
||||
const proc = Bun.spawn(args, { stdin: "inherit", stdout: "inherit", stderr: "inherit" })
|
||||
await proc.exited
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user