Skip to content

Commit

Permalink
Fix Windows table output formatting (aws#4989)
Browse files Browse the repository at this point in the history
  • Loading branch information
justindho committed May 2, 2022
1 parent 3013907 commit cddab17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions awscli/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from awscli.table import MultiTable, Styler, ColorizedStyler
from awscli import text
from awscli import compat
from awscli.utils import json_encoder
from awscli.utils import is_a_tty, json_encoder


LOG = logging.getLogger(__name__)
Expand Down Expand Up @@ -71,7 +71,7 @@ def _flush_stream(self, stream):

class FullyBufferedFormatter(Formatter):
def __call__(self, command_name, response, stream=None):
if stream is None:
if stream is None or is_a_tty():
# Retrieve stdout on invocation instead of at import time
# so that if anything wraps stdout we'll pick up those changes
# (specifically colorama on windows wraps stdout).
Expand Down

0 comments on commit cddab17

Please sign in to comment.