Просмотр исходного кода

Merge pull request #859 from Zhanyuanium/fix/windows-opencode-detection

fix: skip shell wrapper for .exe files in canExecute on Windows
Alvin 2 недель назад
Родитель
Сommit
6b0e76ece9
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/cli/system.ts

+ 1 - 1
src/cli/system.ts

@@ -61,7 +61,7 @@ function canExecute(
       env: environment,
       // Required on Windows to execute .cmd/.bat shims produced by npm/pnpm/yarn
       // (Node's CVE-2024-27980 patch blocks them without a shell).
-      shell: isWindows,
+      shell: isWindows && !/\.exe$/i.test(command),
     });
     return result.status === 0;
   } catch {