mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2025-04-20 14:53:34 +00:00
Embed execOptions as parameter to exec
This commit is contained in:
parent
bf8069946f
commit
ccd1cd7184
1 changed files with 11 additions and 12 deletions
23
main.js
23
main.js
|
@ -81,19 +81,18 @@ async function main() {
|
|||
|
||||
process.env.ANSIBLE_FORCE_COLOR = "True"
|
||||
|
||||
let output = ''
|
||||
const execOptions = {}
|
||||
execOptions.listeners = {
|
||||
stdout: function(data) {
|
||||
output += data.toString()
|
||||
},
|
||||
stderr: function(data) {
|
||||
output += data.toString()
|
||||
let output = ""
|
||||
await exec.exec(cmd.join(' '), null, {
|
||||
listeners: {
|
||||
stdout: function(data) {
|
||||
output += data.toString()
|
||||
},
|
||||
stderr: function(data) {
|
||||
output += data.toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await exec.exec(cmd.join(' '), null, execOptions)
|
||||
core.setOutput('output', output)
|
||||
})
|
||||
core.setOutput("output", output)
|
||||
} catch (error) {
|
||||
core.setFailed(error.message)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue