Compare commits

..

3 Commits

Author SHA1 Message Date
Unai Martinez-Corral
cc576ce25a v0.4.5 (#58) 2022-11-08 02:24:19 +00:00
Unai Martinez-Corral
decf16ff8f with-post-step: update copyright header 2022-11-08 03:21:27 +01:00
Unai Martinez-Corral
9faa1459c9 with-post-step: use option 'shell: true' by default and do not split args
This fixes a breaking change introduced in #46.
'exec' executes commands on the shell by default, while 'spawn' does not.
2022-11-08 03:15:19 +01:00

View File

@@ -3,7 +3,8 @@
* 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"); *
* you may not use this file except in compliance with the License. *
@@ -27,11 +28,8 @@
const { spawn } = require("child_process");
const fs = require('fs');
function run(cmdline) {
var args = cmdline.split(" ");
const cmd = args.shift();
const subprocess = spawn(cmd, args, { stdio: "inherit" });
function run(cmd) {
const subprocess = spawn(cmd, { stdio: "inherit", shell: true });
subprocess.on("exit", (exitCode) => {
process.exitCode = exitCode;
});