Commit 46eead39 authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Change some debug output

parent 96ac6b32
...@@ -357,6 +357,15 @@ func (c *config) handleTask(t task) (err error) { ...@@ -357,6 +357,15 @@ func (c *config) handleTask(t task) (err error) {
if err != nil { if err != nil {
return return
} }
if *scriptDebugging {
var indented = new(bytes.Buffer)
err = json.Indent(indented, outputBytes, " ", " ")
if err != nil {
t.Log("Output (unable to indent: %s):\n%s", err, outputBytes)
} else {
t.Log("Output:\n%s", indented.String())
}
}
err = json.Unmarshal(outputBytes, &output) err = json.Unmarshal(outputBytes, &output)
if err != nil { if err != nil {
...@@ -365,9 +374,6 @@ func (c *config) handleTask(t task) (err error) { ...@@ -365,9 +374,6 @@ func (c *config) handleTask(t task) (err error) {
} }
return return
} }
if *scriptDebugging {
t.Log("Output: %s", output)
}
// if the script does not provide any credential specific states we expect all // if the script does not provide any credential specific states we expect all
// credentials to have the same state as the whole execution (output.State) // credentials to have the same state as the whole execution (output.State)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment