瀏覽代碼

fix(desktop): await execFilePromise and read stdout properly (#27499)

Brendan Allan 4 月之前
父節點
當前提交
f8c3f560d4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/desktop/src/main/apps.ts

+ 1 - 1
packages/desktop/src/main/apps.ts

@@ -58,7 +58,7 @@ async function checkMacosApp(appName: string) {
 async function resolveWindowsAppPath(appName: string): Promise<string | null> {
 async function resolveWindowsAppPath(appName: string): Promise<string | null> {
   let output: string
   let output: string
   try {
   try {
-    output = execFilePromise("where", [appName]).toString()
+    output = await execFilePromise("where", [appName]).then((r) => r.stdout.toString())
   } catch {
   } catch {
     return null
     return null
   }
   }