From 596215aec56c4ecbba5bfb5e870d53d82ddd6b7a Mon Sep 17 00:00:00 2001 From: Paul Hatcherian <1835615+PaulHatch@users.noreply.github.com> Date: Tue, 6 Oct 2020 08:35:24 -0400 Subject: [PATCH] Use quoted matching, do not use exec's args array --- dist/index.js | 4 ++-- index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 4b71d02..2bf9bd5 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1035,7 +1035,7 @@ const cmd = async (command, ...args) => { stderr: (data) => { errors += data.toString(); } }; - await exec.exec(command, args, options) + await exec.exec(command + args.map(a => ` ${a}`).join(' '), [], options) .catch(err => { core.info(`The command '${command} ${args.join(' ')}' failed: ${err}`); }); if (errors !== '') { @@ -1121,7 +1121,7 @@ async function run() { `describe`, `--tags`, `--abbrev=0`, - `--match=${releasePattern}`, + `--match="${releasePattern}"`, `${branch}~1` )).trim(); } diff --git a/index.js b/index.js index 29a6684..7250f2f 100644 --- a/index.js +++ b/index.js @@ -14,7 +14,7 @@ const cmd = async (command, ...args) => { stderr: (data) => { errors += data.toString(); } }; - await exec.exec(command, args, options) + await exec.exec(command + args.map(a => ` ${a}`).join(' '), [], options) .catch(err => { core.info(`The command '${command} ${args.join(' ')}' failed: ${err}`); }); if (errors !== '') { @@ -100,7 +100,7 @@ async function run() { `describe`, `--tags`, `--abbrev=0`, - `--match=${releasePattern}`, + `--match="${releasePattern}"`, `${branch}~1` )).trim(); }