Redirect rust's stdout and stderr to the console

This commit is contained in:
Stepan Fedotov 2020-01-13 19:34:39 +02:00
parent bdc6b45f53
commit d72405f642

View File

@ -22,7 +22,13 @@ if (startupCmd.length < 1) {
var exec = require("child_process").exec;
console.log("Starting Rust...");
exec(startupCmd);
const gameProcess = exec(startupCmd);
gameProcess.stdout.on('data', console.log);
gameProcess.stderr.on('data', console.log);
gameProcess.on('exit', function (code, signal) {
process.exit(code);
});
var waiting = true;