Fix app development command from another directory

This commit is contained in:
Samuel Elliott 2023-01-22 23:03:59 +00:00
parent 0a17dd3cf0
commit 8d8672a7e1
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6

View File

@ -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<Arguments>) {
}
execFileSync(electron, [
'dist/app/app-entry.cjs',
path.resolve(dir, 'dist', 'app', 'app-entry.cjs'),
], {
stdio: 'inherit',
env: {