Skip to content

Commit fb182e7

Browse files
committed
docs: clarify root error stream handling
Made-with: Cursor
1 parent 097ff6f commit fb182e7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cmd/root.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,9 @@ func Execute(m Metadata) {
217217
// we should add them back later as it looks cleaner
218218
errorTextStyle := styles.ErrorText.UnsetMargins()
219219

220-
// Fang passes the destination for errors (normally stderr). pterm's
221-
// global Error printer does not know about it, so temporarily point
222-
// pterm at fang's writer for this handler invocation.
220+
// Keep command errors on fang's error stream, normally stderr. This
221+
// gives curl-like commands a quiet stdout for response bodies and
222+
// scripts while preserving the existing pterm error styling.
223223
oldErrorWriter := pterm.Error.Writer
224224
pterm.Error.Writer = w
225225
defer func() {

0 commit comments

Comments
 (0)