jakejs / jake

JavaScript build tool, similar to Make or Rake. Built to work with Node.js.
http://jakejs.com
Apache License 2.0
1.96k stars 190 forks source link

No output for .execSync on Windows #381

Open tim-lebedkov opened 3 years ago

tim-lebedkov commented 3 years ago

I use this, but get not output on Windows:

cp.execSync(c, {stdio: 'inherit'});

tim-lebedkov commented 3 years ago

A simple program

var cp = require("child_process");

cp.execSync("c:/msys64/mingw64/bin/c++", {stdio: 'inherit'});

gives the following output

C:\builds\npackd-minsizerel-jake\npackdg>node C:\Users\IEUser\Documents\npackd-cpp\npackdg\Test.js
c++: fatal error: no input files
compilation terminated.
child_process.js:669
    throw err;
    ^

Error: Command failed: c:/msys64/mingw64/bin/c++
    at checkExecSyncError (child_process.js:630:11)
    at Object.execSync (child_process.js:666:15)
    at Object.<anonymous> (C:\Users\IEUser\Documents\npackd-cpp\npackdg\Test.js:3:4)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 5252,
  stdout: null,
  stderr: null
}
tim-lebedkov commented 3 years ago

False alarm. The problem was that gcc crashed. Not sure if it is possible to output more information in this case.