Move base command back to cmd variable

This commit is contained in:
Brooks Swinnerton 2021-07-31 08:45:46 -04:00
parent d8a8e9121d
commit bf8069946f
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 options = core.getInput("options")
const sudo = core.getInput("sudo") const sudo = core.getInput("sudo")
let cmd = [playbook] let cmd = ["ansible-playbook", playbook]
if (options) { if (options) {
cmd.push(options.replace(/\n/g, " ")) cmd.push(options.replace(/\n/g, " "))
@ -92,7 +92,7 @@ async function main() {
} }
} }
await exec.exec("ansible-playbook", cmd, execOptions) await exec.exec(cmd.join(' '), null, execOptions)
core.setOutput('output', output) core.setOutput('output', output)
} catch (error) { } catch (error) {
core.setFailed(error.message) core.setFailed(error.message)