pull/101/head
Piero Toffanin 2019-11-26 08:30:57 -05:00
rodzic 488ba227d8
commit b1b92ce132
1 zmienionych plików z 15 dodań i 10 usunięć

Wyświetl plik

@ -61,16 +61,21 @@ function makeRunner(command, args, requiredOptions = [], outputTestFile = null){
// Launch
const env = utils.clone(process.env);
env.LD_LIBRARY_PATH = path.join(config.odm_path, "SuperBuild", "install", "lib");
let childProcess = spawn(command, commandArgs, { env });
childProcess
.on('exit', (code, signal) => done(null, code, signal))
.on('error', done);
childProcess.stdout.on('data', chunk => outputReceived(chunk.toString()));
childProcess.stderr.on('data', chunk => outputReceived(chunk.toString()));
return childProcess;
try{
let childProcess = spawn(command, commandArgs, { env });
childProcess
.on('exit', (code, signal) => done(null, code, signal))
.on('error', done);
childProcess.stdout.on('data', chunk => outputReceived(chunk.toString()));
childProcess.stderr.on('data', chunk => outputReceived(chunk.toString()));
return childProcess;
}catch(e){
// Catch errors such as ENOMEM
logger.warn(`Error: ${e.message}`);
done(e);
}
};
}