Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No output for .execSync on Windows #381

Open
tim-lebedkov opened this issue Sep 13, 2020 · 2 comments
Open

No output for .execSync on Windows #381

tim-lebedkov opened this issue Sep 13, 2020 · 2 comments

Comments

@tim-lebedkov
Copy link

I use this, but get not output on Windows:

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

@tim-lebedkov
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant