Commit b852302
fix(printer): emit error and repo-list messages on stderr
PrintMsgErr and PrintRepoErr were writing to p.writer (stdout)
despite their names and despite the parallel Error method routing
its output to p.errWriter. That meant the gih CLI's error notices
("Failed: <repo>", "Timeout: <repo>") and the final failed/timed-out
repository list landed on stdout — indistinguishable from successful
results when the caller used `2>` to capture errors or `>` to
capture results.
Switch both methods to p.errWriter to match the Error method and the
implicit contract suggested by the *Err naming. Existing tests use
NewPrinter(&buf, &buf) so they keep passing; the new behaviour shows
up only when callers wire distinct writers, which is the use case
this fix enables.
Reported by GitHub Copilot on PR #26.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 4ea80be commit b852302
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | | - | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
129 | | - | |
| 130 | + | |
| 131 | + | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
137 | | - | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
0 commit comments