Use quoted matching, do not use exec's args array

This commit is contained in:
Paul Hatcherian 2020-10-06 08:35:24 -04:00
parent 858da7b39c
commit 596215aec5
2 changed files with 4 additions and 4 deletions

4
dist/index.js vendored
View file

@ -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();
}

View file

@ -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();
}