mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 11:06:56 +08:00
merge main into dev
This commit is contained in:
@@ -24,16 +24,15 @@
|
|||||||
* * https://github.com/docker/login-action/issues/72 *
|
* * https://github.com/docker/login-action/issues/72 *
|
||||||
* * https://github.com/actions/runner/issues/1478 *
|
* * https://github.com/actions/runner/issues/1478 *
|
||||||
* ================================================================================================================== */
|
* ================================================================================================================== */
|
||||||
const { exec } = require("child_process");
|
const { spawn } = require("child_process");
|
||||||
|
|
||||||
function run(cmd) {
|
function run(cmdline) {
|
||||||
exec(cmd, (error, stdout, stderr) => {
|
var args = cmdline.split(" ");
|
||||||
if ( stdout.length !== 0 ) { console.log(`${stdout}`); }
|
const cmd = args.shift();
|
||||||
if ( stderr.length !== 0 ) { console.error(`${stderr}`); }
|
|
||||||
if (error) {
|
const subprocess = spawn(cmd, args, { stdio: "inherit" });
|
||||||
process.exitCode = error.code;
|
subprocess.on("exit", (exitCode) => {
|
||||||
console.error(`${error}`);
|
process.exitCode = exitCode;
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user