proper user permissions inside container
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user