From 686ed543ab8e9275bc965a610d48472caa7324fb Mon Sep 17 00:00:00 2001 From: JOLIMAITRE Matthieu Date: Sat, 3 Feb 2024 21:02:50 +0100 Subject: [PATCH] fix main call --- instance/daemon.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instance/daemon.ts b/instance/daemon.ts index ce14c0b..655d8c9 100755 --- a/instance/daemon.ts +++ b/instance/daemon.ts @@ -7,7 +7,6 @@ import { log_from, sleep } from "./src/lib/utils.ts"; const log = log_from("daemon"); -if (import.meta.main) await main(); async function main() { const state = await State.load(); const server = await daemon_listen(socket_path()); @@ -141,3 +140,5 @@ function termination_function(state: State, server: Deno.Listener) { Deno.exit(0); }; } + +if (import.meta.main) await main();