(content string)
| 296 | } |
| 297 | |
| 298 | func environmentOutputToTarget(content string) { |
| 299 | if environmentOutput != "" { |
| 300 | if err := os.WriteFile(environmentOutput, []byte(content+"\n"), 0644); err != nil { |
| 301 | Error(fmt.Sprintf("Failed to write to %s: %s", environmentOutput, err)) |
| 302 | os.Exit(1) |
| 303 | } |
| 304 | Info(fmt.Sprintf("Output written to %s", environmentOutput)) |
| 305 | } else { |
| 306 | fmt.Println(content) |
| 307 | } |
| 308 | } |
no test coverage detected