@cortask/core 0.2.30 → 0.2.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3023,7 +3023,9 @@ function exec2(args, timeout = DEFAULT_TIMEOUT) {
3023
3023
  const isScript = CMD.endsWith(".js");
3024
3024
  const cmd = isScript ? process.env.NODE_PATH_BIN || process.execPath : CMD;
3025
3025
  const finalArgs = isScript ? [CMD, ...args] : args;
3026
- execFile(cmd, finalArgs, { timeout, maxBuffer: 5 * 1024 * 1024 }, (err, stdout, stderr) => {
3026
+ const env = { ...process.env };
3027
+ delete env.ELECTRON_RUN_AS_NODE;
3028
+ execFile(cmd, finalArgs, { timeout, maxBuffer: 5 * 1024 * 1024, env }, (err, stdout, stderr) => {
3027
3029
  if (err) {
3028
3030
  const msg = stderr?.trim() || stdout?.trim() || err.message;
3029
3031
  reject(new Error(msg));