Skip to content

Commit d43cbf0

Browse files
dbiebercopybara-github
authored andcommitted
Print, rather than Display, errors and usage screens.
PiperOrigin-RevId: 255250566 Change-Id: I77e331b41dcfa5d3fa7e0bb569f58cb60b91c350
1 parent 4d13660 commit d43cbf0

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎fire/core.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,14 +278,14 @@ def _DisplayError(component_trace):
278278
help_text = helptext.HelpText(result, component_trace,
279279
component_trace.verbose)
280280
output.append(help_text)
281+
Display(output, out=sys.stderr)
281282
else:
282-
output.append(formatting.Error('ERROR: ')
283-
+ component_trace.elements[-1].ErrorAsStr())
283+
print(formatting.Error('ERROR: ')
284+
+ component_trace.elements[-1].ErrorAsStr(),
285+
file=sys.stderr)
284286
error_text = helptext.UsageText(result, component_trace,
285287
component_trace.verbose)
286-
output.append(error_text)
287-
288-
Display(output, out=sys.stderr)
288+
print(error_text, file=sys.stderr)
289289

290290

291291
def _DictAsString(result, verbose=False):

0 commit comments

Comments
 (0)