PrintUnchanged prints the line for an artifact the command didn't change because it already was as asked, such as an artifact that already matches the version to restore. In a terminal, it reads "! " on stderr, like gh issue close on a closed issue, so stdout stays empty. Otherwise it is a
(ios *iostreams.IOStreams, r Result, message, reason string)
| 59 | // piped line on stdout whose status is "skipped", with reason. It isn't a |
| 60 | // failure, so the command exits 0 after it. |
| 61 | func PrintUnchanged(ios *iostreams.IOStreams, r Result, message, reason string) { |
| 62 | if !ios.IsStdoutTTY() { |
| 63 | printResultLine(ios.Out, "skipped", r, reason) |
| 64 | return |
| 65 | } |
| 66 | fmt.Fprintf(ios.ErrOut, "%s %s\n", ios.ColorScheme().WarningIcon(), message) |
| 67 | } |
| 68 | |
| 69 | // PrintFailure prints the line for an artifact the command couldn't act on, |
| 70 | // with err's reason. In a terminal, it reads "X Failed to <action>: <reason>" |