This commit is contained in:
Unai Martinez-Corral
2022-11-08 02:24:19 +00:00
committed by GitHub

View File

@@ -3,7 +3,8 @@
* Unai Martinez-Corral * * Unai Martinez-Corral *
* * * *
* ================================================================================================================== * * ================================================================================================================== *
* Copyright 2021 Unai Martinez-Corral <unai.martinezcorral@ehu.eus> * * Copyright 2021-2022 Unai Martinez-Corral <unai.martinezcorral@ehu.eus> *
* Copyright 2022 Unai Martinez-Corral <umartinezcorral@antmicro.com> *
* * * *
* Licensed under the Apache License, Version 2.0 (the "License"); * * Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. * * you may not use this file except in compliance with the License. *
@@ -27,11 +28,8 @@
const { spawn } = require("child_process"); const { spawn } = require("child_process");
const fs = require('fs'); const fs = require('fs');
function run(cmdline) { function run(cmd) {
var args = cmdline.split(" "); const subprocess = spawn(cmd, { stdio: "inherit", shell: true });
const cmd = args.shift();
const subprocess = spawn(cmd, args, { stdio: "inherit" });
subprocess.on("exit", (exitCode) => { subprocess.on("exit", (exitCode) => {
process.exitCode = exitCode; process.exitCode = exitCode;
}); });