Namely, only the output of the cmd command (e.g. error executing psxinject: exit status 1) is decorated, instead of the whole stderr of the actual psxinject command.
For this, cmd.Stdout and cmd.Stderr should be readable instead just writing to their os equivalent readers.
Can be reproduced using ExampleExecute in psxinject_test.go.
I first about doing all of this using a logger (preferably the one in the experimental slog package) or making this configurable, but then decided against that, because the whole psximager package is internal anyways.
Namely, only the output of the
cmd
command (e.g.error executing psxinject: exit status 1
) is decorated, instead of the whole stderr of the actualpsxinject
command. For this,cmd.Stdout
andcmd.Stderr
should be readable instead just writing to theiros
equivalent readers. Can be reproduced usingExampleExecute
inpsxinject_test.go
.I first about doing all of this using a logger (preferably the one in the experimental slog package) or making this configurable, but then decided against that, because the whole
psximager
package is internal anyways.