From a96b78b01ee34d61c855cd8734269fac3682739e Mon Sep 17 00:00:00 2001 From: Flynn Date: Sat, 20 Jan 2024 02:06:56 -0500 Subject: [PATCH] Switch to less intense main module detection --- core/runtime.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/runtime.ts b/core/runtime.ts index d96af0a..c90c416 100644 --- a/core/runtime.ts +++ b/core/runtime.ts @@ -131,7 +131,7 @@ export function createRuntimeScope(options: RuntimeOptions = {}) { } // Detect if we are a main module (running in podman) -if (Deno.mainModule.endsWith('core/runtime.ts')) { +if (import.meta.main) { // autostart execution if that's the case,otherwise assume we are headless and/or in-testing createRuntimeScope().start(); }