From b2694a3933b8348501b9fa9fe97e664825c97940 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Sun, 15 Mar 2026 13:50:50 -0700 Subject: [PATCH] Add /sandlot/bin to container PATH --- src/vm.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vm.ts b/src/vm.ts index 6f95b6e..0c29182 100644 --- a/src/vm.ts +++ b/src/vm.ts @@ -9,7 +9,7 @@ const DEBUG = !!process.env.DEBUG const CONTAINER_NAME = "sandlot" const USER = "ubuntu" const CLAUDE_BIN = `/home/${USER}/.local/bin/claude` -const CONTAINER_PATH = `/sandlot/.cargo/bin:/sandlot/.go/bin:/sandlot/.gopath/bin:/home/${USER}/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin` +const CONTAINER_PATH = `/sandlot/bin:/sandlot/.cargo/bin:/sandlot/.go/bin:/sandlot/.gopath/bin:/home/${USER}/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin` const CONTAINER_ENV = { RUSTUP_HOME: "/sandlot/.rustup", CARGO_HOME: "/sandlot/.cargo", @@ -370,7 +370,7 @@ export async function neofetch(): Promise { /** Run a bash command in the container at the given workdir, capturing output. */ export async function exec(workdir: string, command: string): Promise<{ exitCode: number; stdout: string; stderr: string }> { const envExports = Object.entries(CONTAINER_ENV).map(([k, v]) => `export ${k}=${v}`).join("; ") - const result = await $`container exec --user ${USER} --workdir ${containerPath(workdir)} ${CONTAINER_NAME} bash -c ${`export PATH=$HOME/.local/bin:$PATH; ${envExports}; ` + command}`.nothrow().quiet() + const result = await $`container exec --user ${USER} --workdir ${containerPath(workdir)} ${CONTAINER_NAME} bash -c ${`export PATH=${CONTAINER_PATH}; ${envExports}; ` + command}`.nothrow().quiet() return { exitCode: result.exitCode, stdout: result.stdout.toString().trim(),