mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2025-09-05 08:25:46 -06:00
Embed execOptions as parameter to exec
This commit is contained in:
parent
bf8069946f
commit
ccd1cd7184
11
main.js
11
main.js
@ -81,9 +81,9 @@ async function main() {
|
|||||||
|
|
||||||
process.env.ANSIBLE_FORCE_COLOR = "True"
|
process.env.ANSIBLE_FORCE_COLOR = "True"
|
||||||
|
|
||||||
let output = ''
|
let output = ""
|
||||||
const execOptions = {}
|
await exec.exec(cmd.join(' '), null, {
|
||||||
execOptions.listeners = {
|
listeners: {
|
||||||
stdout: function(data) {
|
stdout: function(data) {
|
||||||
output += data.toString()
|
output += data.toString()
|
||||||
},
|
},
|
||||||
@ -91,9 +91,8 @@ async function main() {
|
|||||||
output += data.toString()
|
output += data.toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
})
|
||||||
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)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user