bug #31849 [Console] Add check for Konsole/Yakuake to disable hyperlinks (belinde)

This PR was squashed before being merged into the 4.3 branch (closes #31849).

Discussion
----------

[Console] Add check for Konsole/Yakuake to disable hyperlinks

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #31809
| License       | MIT
| Doc PR        |

Added check for environment variable set by Konsole and other relateds terminal emulators.

A ticket has been opened to Konsole team to support this feature someday: https://bugs.kde.org/show_bug.cgi?id=408288

Commits
-------

14b27b7d02 [Console] Add check for Konsole/Yakuake to disable hyperlinks
This commit is contained in:
Fabien Potencier 2019-06-05 04:08:12 +02:00
commit ed59830f55
2 changed files with 2 additions and 2 deletions

View File

@ -187,7 +187,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
$unsetCodes = [];
if (null === $this->handlesHrefGracefully) {
$this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR');
$this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') && !getenv('KONSOLE_VERSION');
}
if (null !== $this->foreground) {

View File

@ -435,7 +435,7 @@ class CliDumper extends AbstractDumper
}
if (null === $this->handlesHrefGracefully) {
$this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR');
$this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') && !getenv('KONSOLE_VERSION');
}
if (isset($attr['ellipsis'], $attr['ellipsis-type'])) {