Skip to content

Commit e5a4c4d

Browse files
committed
Expose Output::isDecorated
This can be used by an ErrorFormatter to determine if `--ansi` or `--no-ansi` was used. A use case can be to toggle rendering of colors or hyperlinks. When ansi is not enabled, one might want to render a link differently.
1 parent 475a18c commit e5a4c4d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/Command/Output.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ public function isVerbose(): bool;
1818

1919
public function isDebug(): bool;
2020

21+
public function isDecorated(): bool;
22+
2123
}

src/Command/Symfony/SymfonyOutput.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,9 @@ public function isDebug(): bool
4949
return $this->symfonyOutput->isDebug();
5050
}
5151

52+
public function isDecorated(): bool
53+
{
54+
return $this->symfonyOutput->isDecorated();
55+
}
56+
5257
}

0 commit comments

Comments
 (0)