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
23
main.js
23
main.js
@ -81,19 +81,18 @@ 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()
|
||||||
},
|
},
|
||||||
stderr: function(data) {
|
stderr: function(data) {
|
||||||
output += data.toString()
|
output += data.toString()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
|
core.setOutput("output", output)
|
||||||
await exec.exec(cmd.join(' '), null, execOptions)
|
|
||||||
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