From d5307a72079f87873161461305005da0a42b6547 Mon Sep 17 00:00:00 2001 From: Will Chen Date: Wed, 25 Jun 2025 16:45:49 -0700 Subject: [PATCH] Capacitor command fix (#498) --- src/components/CapacitorControls.tsx | 2 +- src/ipc/handlers/capacitor_handlers.ts | 4 ++++ src/ipc/utils/simpleSpawn.ts | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/CapacitorControls.tsx b/src/components/CapacitorControls.tsx index 062a0d9..2f65675 100644 --- a/src/components/CapacitorControls.tsx +++ b/src/components/CapacitorControls.tsx @@ -209,7 +209,7 @@ export function CapacitorControls({ appId }: CapacitorControlsProps) { {errorDetails && (
-
+
                   {errorDetails.message}
                 
diff --git a/src/ipc/handlers/capacitor_handlers.ts b/src/ipc/handlers/capacitor_handlers.ts index 18107ce..928eb9b 100644 --- a/src/ipc/handlers/capacitor_handlers.ts +++ b/src/ipc/handlers/capacitor_handlers.ts @@ -66,6 +66,10 @@ export function registerCapacitorHandlers() { cwd: appPath, successMessage: "Capacitor sync completed successfully", errorPrefix: "Failed to sync Capacitor", + env: { + ...process.env, + LANG: "en_US.UTF-8", + }, }); }, ); diff --git a/src/ipc/utils/simpleSpawn.ts b/src/ipc/utils/simpleSpawn.ts index e31c25a..bb97a5e 100644 --- a/src/ipc/utils/simpleSpawn.ts +++ b/src/ipc/utils/simpleSpawn.ts @@ -8,11 +8,13 @@ export async function simpleSpawn({ cwd, successMessage, errorPrefix, + env, }: { command: string; cwd: string; successMessage: string; errorPrefix: string; + env?: Record; }): Promise { return new Promise((resolve, reject) => { logger.info(`Running: ${command}`); @@ -20,6 +22,7 @@ export async function simpleSpawn({ cwd, shell: true, stdio: "pipe", + env, }); let stdout = "";