尝试在解压的 asar 中生成 exe 会导致 exe 被解压到临时目录?

Attempting to spawn on exe in unpacked asar results in the exe being unpacked to a temp directory?

我有一个 electron 应用程序,我正在用 electron-builder 打包。

在那个应用程序中有一个 exe 的分布,我希望能够从 electron 调用它。

我的 package.json 的 build 部分包括一个 asarUnpack 属性,像这样:

"asarUnpack": [
  "**/node_modules/dist-myexe.exe/**/*",
],

这意味着我的应用程序安装时,exe被提取到 C:\Program Files\MyElectronApp\resources\app.asar.unpacked\node_modules\myexe.exe\vendor\myexe.exe.

但是,当我尝试 child-process.spawn 那个 exe 时,windows 尝试 运行 来自以下版本的版本: %APPDATA%\Local\Temp\par-blahblahblah\cache-blahblahblah\myexe.exe

我想知道这是否与以下内容有关:https://github.com/electron/electron/issues/12092

这是电子应用程序的预期行为吗?我如何才能将程序文件中的 exe 作为目标?

我试图执行的 exe 是 exiftool.exe,这实际上是提取到 Temp 的罪魁祸首,而不是电子。