Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/poetry/installation/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ def __init__(
self._shutdown = False
self._hashes: dict[str, str] = {}

# Cache whether decorated output is supported.
# https://github.com/python-poetry/cleo/issues/423
self._decorated_output: bool = self._io.output.is_decorated()

@property
def installations_count(self) -> int:
return self._executed["install"]
Expand All @@ -123,7 +127,7 @@ def enabled(self) -> bool:
return self._enabled

def supports_fancy_output(self) -> bool:
return self._io.output.is_decorated() and not self._dry_run
return self._decorated_output and not self._dry_run

def disable(self) -> Executor:
self._enabled = False
Expand Down