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;
|
const workdir = rel && !rel.startsWith('..') ? join(containerHome, rel) : containerHome;
|
||||||
proc = Bun.spawn([
|
proc = Bun.spawn([
|
||||||
dockerPath, 'exec', '-i',
|
dockerPath, 'exec', '-i',
|
||||||
|
'-u', `${sandbox.username}`,
|
||||||
'-w', workdir,
|
'-w', workdir,
|
||||||
...envFlags,
|
...envFlags,
|
||||||
containerId,
|
containerId,
|
||||||
|
|||||||
@@ -496,7 +496,11 @@ export async function deleteSession(
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function listUserSessions(baseCwd: string): Promise<SessionMeta[]> {
|
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));
|
const sessions: SessionMeta[] = Object.entries(index).map(([id, entry]) => indexEntryToMeta(id, entry));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user