printFailure reports an artifact gh couldn't delete, on stderr. In a terminal, it's the failure line the other artifact commands print. Piped, it's " : ", like gh codespace delete, with the same reason.
(ios *iostreams.IOStreams, number int, err error)
| 179 | // terminal, it's the failure line the other artifact commands print. Piped, |
| 180 | // it's "<number>: <reason>", like gh codespace delete, with the same reason. |
| 181 | func printFailure(ios *iostreams.IOStreams, number int, err error) { |
| 182 | if !ios.IsStdoutTTY() { |
| 183 | fmt.Fprintf(ios.ErrOut, "%d: %s\n", number, shared.FailureReason(err)) |
| 184 | return |
| 185 | } |
| 186 | shared.PrintFailure(ios, shared.Result{Number: number}, fmt.Sprintf("delete artifact %d", number), err) |
| 187 | } |
| 188 | |
| 189 | // confirmationPrompt asks once for every artifact, naming each one, such as |
| 190 | // "Delete artifacts 2 (OAuth callback plan) and 5 (Barista feedback notes) |
no test coverage detected