This commit is contained in:
J H
2024-02-13 15:49:31 -07:00
parent 599da8f52c
commit 87d3e83eb4

View File

@@ -125,6 +125,7 @@ export type Utils<
command: ValidIfNoStupidEscape<A> | [string, ...string[]],
options: CommandOptions & {
mounts?: { path: string; options: MountOptions }[]
overlay?: Overlay
},
) => Promise<DaemonReturned>
store: {
@@ -224,10 +225,11 @@ export const createUtils = <
command: ValidIfNoStupidEscape<A> | [string, ...string[]],
options: CommandOptions & {
mounts?: { path: string; options: MountOptions }[]
overlay?: Overlay
},
): Promise<DaemonReturned> => {
const commands = splitCommand(command)
const overlay = await Overlay.of(effects, imageId)
const overlay = options.overlay || (await Overlay.of(effects, imageId))
for (let mount of options.mounts || []) {
await overlay.mount(mount.options, mount.path)
}