| Conditions | 5 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public function run(array $commands): bool |
||
| 30 | { |
||
| 31 | $process = Process::fromShellCommandline(implode(' && ', $commands), $this->directory, null, null, null); |
||
| 32 | |||
| 33 | if ('\\' !== DIRECTORY_SEPARATOR && file_exists('/dev/tty') && is_readable('/dev/tty')) { |
||
| 34 | try { |
||
| 35 | $process->setTty(true); |
||
| 36 | } catch (RuntimeException $e) { |
||
| 37 | $this->output->writeln('Warning: ' . $e->getMessage()); |
||
| 38 | } |
||
| 39 | } |
||
| 40 | |||
| 41 | $process->run(function ($type, $line) { |
||
| 42 | $this->output->write($line); |
||
| 43 | }); |
||
| 44 | |||
| 45 | return $process->isSuccessful(); |
||
| 46 | } |
||
| 48 |