From 52318f1bb61a00df7c9a5768fc0947fc4fcb476a Mon Sep 17 00:00:00 2001 From: jaime-ez Date: Wed, 1 Mar 2023 22:22:46 -0300 Subject: [PATCH] fix: pkg entrypoint --- src/service/daemon.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/service/daemon.ts b/src/service/daemon.ts index d961bafb4..bf97a5235 100644 --- a/src/service/daemon.ts +++ b/src/service/daemon.ts @@ -59,9 +59,10 @@ function _start (options: any) { starts += 1 // Fork the child process piping stdin/out/err to the parent - // NOTE: ADDING process.argv[1] as first arg to the spawned process is a workaround to fix a pkg bug + // NOTE: ADDING process.pkg.entrypoint as first arg to the spawned process is a workaround to fix a pkg bug // https://github.com/vercel/pkg/issues/1356 - child = spawn(options.processExec, [process.argv[1], 'start'].concat(process.argv.slice(2)), { + // @ts-ignore + child = spawn(options.processExec, [process.pkg.entrypoint, 'start'].concat(process.argv.slice(2)), { env: process.env })