From 9faa1459c99387fdfedd1dd54a43345b166cb178 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Tue, 8 Nov 2022 03:06:50 +0100 Subject: [PATCH 1/2] 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. --- with-post-step/main.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/with-post-step/main.js b/with-post-step/main.js index 45caf18..107ec21 100644 --- a/with-post-step/main.js +++ b/with-post-step/main.js @@ -27,11 +27,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; }); From decf16ff8f2b8699ed91f58f71120b8d2543b011 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Tue, 8 Nov 2022 03:19:28 +0100 Subject: [PATCH 2/2] with-post-step: update copyright header --- with-post-step/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/with-post-step/main.js b/with-post-step/main.js index 107ec21..1a9c3f0 100644 --- a/with-post-step/main.js +++ b/with-post-step/main.js @@ -3,7 +3,8 @@ * Unai Martinez-Corral * * * * ================================================================================================================== * - * Copyright 2021 Unai Martinez-Corral * + * Copyright 2021-2022 Unai Martinez-Corral * + * Copyright 2022 Unai Martinez-Corral * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. *