From 8d8672a7e1e2f7ee1edbf09220d4cfbc059ffddf Mon Sep 17 00:00:00 2001 From: Samuel Elliott Date: Sun, 22 Jan 2023 23:03:59 +0000 Subject: [PATCH] Fix app development command from another directory --- src/cli/app.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cli/app.ts b/src/cli/app.ts index c403674..8e09ebe 100644 --- a/src/cli/app.ts +++ b/src/cli/app.ts @@ -1,9 +1,11 @@ import process from 'node:process'; import { createRequire } from 'node:module'; +import * as path from 'node:path'; import { execFileSync } from 'node:child_process'; import createDebug from 'debug'; import type { Arguments as ParentArguments } from '../cli.js'; import { ArgumentsCamelCase, Argv, YargsArguments } from '../util/yargs.js'; +import { dir } from '../util/product.js'; const debug = createDebug('cli:app'); @@ -25,7 +27,7 @@ export async function handler(argv: ArgumentsCamelCase) { } execFileSync(electron, [ - 'dist/app/app-entry.cjs', + path.resolve(dir, 'dist', 'app', 'app-entry.cjs'), ], { stdio: 'inherit', env: {