proper user permissions inside container

This commit is contained in:
2026-02-25 19:44:38 +00:00
parent 748619a3c9
commit 10acd14755
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -239,6 +239,7 @@ export async function spawnPi(
const workdir = rel && !rel.startsWith('..') ? join(containerHome, rel) : containerHome;
proc = Bun.spawn([
dockerPath, 'exec', '-i',
'-u', `${sandbox.username}`,
'-w', workdir,
...envFlags,
containerId,
+5 -1
View File
@@ -496,7 +496,11 @@ export async function deleteSession(
}
export async function listUserSessions(baseCwd: string): Promise<SessionMeta[]> {
const index = await loadIndex(baseCwd);
let index = await loadIndex(baseCwd);
if (Object.keys(index).length === 0) {
index = await rebuildIndex(baseCwd);
}
const sessions: SessionMeta[] = Object.entries(index).map(([id, entry]) => indexEntryToMeta(id, entry));