From bc9a855494bf1b274ab91f978d567940daad8dd9 Mon Sep 17 00:00:00 2001 From: Marco Date: Mon, 28 Oct 2024 22:15:57 +1100 Subject: [PATCH] stage-does-not-require-main --- subsystems/sidecar/ops/stage.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/subsystems/sidecar/ops/stage.js b/subsystems/sidecar/ops/stage.js index 8a8bd5671..cf69e736c 100644 --- a/subsystems/sidecar/ops/stage.js +++ b/subsystems/sidecar/ops/stage.js @@ -111,13 +111,12 @@ module.exports = class Stage extends Opstream { if (dryRun) this.push({ tag: 'dry' }) const root = state.dir - const main = unixPathResolve('/', state.main) const src = new LocalDrive(root, { followLinks: bare === false, metadata: new Map() }) const dst = bundle.drive const opts = { ignore, dryRun, batch: true } const builtins = terminalBare ? sidecar.gunk.bareBuiltins : sidecar.gunk.builtins const linker = new ScriptLinker(src, { builtins }) - const entrypoints = [main, ...(state.manifest.pear?.stage?.entrypoints || [])].map((entry) => unixPathResolve('/', entry)) + const entrypoints = [...(state.manifest.main ? [state.main] : []), ...(state.manifest.pear?.stage?.entrypoints || [])].map((entry) => unixPathResolve('/', entry)) const mods = await linker.warmup(entrypoints) for await (const [filename, mod] of mods) src.metadata.put(filename, mod.cache()) const mirror = new Mirror(src, dst, opts)