Separate command from arguments to exec

This commit is contained in:
Brooks Swinnerton 2021-07-30 13:47:44 -04:00
parent 98591e5513
commit acb5e94696
No known key found for this signature in database
GPG Key ID: 72743B7DE552E25A

View File

@ -16,7 +16,7 @@ async function main() {
const options = core.getInput("options")
const sudo = core.getInput("sudo")
let args = ["ansible-playbook", playbook]
let args = [playbook]
if (options) {
args.push(options.replace(/\n/g, " "))
@ -91,7 +91,7 @@ async function main() {
}
}
await exec.exec(args.join(' '), execOptions)
await exec.exec("ansible-playbook", args, execOptions)
} catch (error) {
core.setFailed(error.message)
}