in plugin/step/command/command.go [156:170]
func setOutputWrite(path string) (io.Writer, *os.File, error) {
var file *os.File
if _, err := os.Stat(path); err != nil && errors.Is(err, fs.ErrNotExist) {
file, err = create(path)
if err != nil {
return nil, nil, err
}
} else {
file, err = os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if err != nil {
return nil, nil, err
}
}
return io.MultiWriter(file, os.Stdout), file, nil
}