From ed484c278bb4434fefe31d1f497f497e3c9567b6 Mon Sep 17 00:00:00 2001 From: honorabrutroll Date: Sun, 4 Oct 2015 17:06:00 -0500 Subject: [PATCH] Change pretty option processor to only raise error when using output file --- httpie/input.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/httpie/input.py b/httpie/input.py index da3cc525..4d8af82e 100644 --- a/httpie/input.py +++ b/httpie/input.py @@ -378,7 +378,8 @@ class Parser(ArgumentParser): if self.args.prettify == PRETTY_STDOUT_TTY_ONLY: self.args.prettify = PRETTY_MAP[ 'all' if self.env.stdout_isatty else 'none'] - elif self.args.prettify and self.env.is_windows: + elif (self.args.prettify and self.env.is_windows and + self.args.output_file): self.error('Only terminal output can be colorized on Windows.') else: # noinspection PyTypeChecker