From 03ba8e2e9b8ca18265e692850356d1757c86cb80 Mon Sep 17 00:00:00 2001 From: Alex <49969959+alexzhang1030@users.noreply.github.com> Date: Wed, 17 Jan 2024 19:55:31 +0800 Subject: [PATCH] fix(electron): decode app file path (#176) --- packages/electron/src/cli.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/electron/src/cli.ts b/packages/electron/src/cli.ts index e1a279ab..6da9db54 100644 --- a/packages/electron/src/cli.ts +++ b/packages/electron/src/cli.ts @@ -2,7 +2,7 @@ import { execaSync } from 'execa' import electron from 'electron' import { resolve } from 'pathe' -const appPath = resolve(new URL('../dist/app.cjs', import.meta.url).pathname) +const appPath = decodeURIComponent(resolve(new URL('../dist/app.cjs', import.meta.url).pathname)) const argv = process.argv.slice(2) const result = execaSync(electron as unknown as string, [appPath].concat(argv), {