diff --git a/lib/util/utils.ts b/lib/util/utils.ts index 1af8293..35a48d9 100644 --- a/lib/util/utils.ts +++ b/lib/util/utils.ts @@ -125,6 +125,7 @@ export type Utils< command: ValidIfNoStupidEscape | [string, ...string[]], options: CommandOptions & { mounts?: { path: string; options: MountOptions }[] + overlay?: Overlay }, ) => Promise store: { @@ -224,10 +225,11 @@ export const createUtils = < command: ValidIfNoStupidEscape | [string, ...string[]], options: CommandOptions & { mounts?: { path: string; options: MountOptions }[] + overlay?: Overlay }, ): Promise => { 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) }