Skip to content

Commit 084476e

Browse files
committed
fix: disable TTY mode when proxying through DDEV
ddev exec handles its own terminal, and enabling TTY on the subprocess causes stray ANSI escape sequences (e.g. ^[[22;1) in the output.
1 parent 53ea948 commit 084476e

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

src/ProxyCommand.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,14 @@ public function execute(InputInterface $input): int
6262
$process->setTimeout(null);
6363
$process->setWorkingDirectory($this->detector->getDirectory());
6464

65-
try {
66-
$process->setTty(Process::isTtySupported());
67-
} catch (\RuntimeException) {
68-
// TTY not supported
65+
// When running via DDEV, avoid TTY mode — ddev exec handles
66+
// its own terminal and TTY causes stray escape sequences.
67+
if (! $this->detector->isDdev()) {
68+
try {
69+
$process->setTty(Process::isTtySupported());
70+
} catch (\RuntimeException) {
71+
// TTY not supported
72+
}
6973
}
7074

7175
$process->run(function (string $type, string $line): void {

0 commit comments

Comments
 (0)