Skip to content

Commit b06a80a

Browse files
committed
Update CanRunProcesses.php
1 parent 1b0e701 commit b06a80a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/Concerns/CanRunProcesses.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,18 @@ protected function runProcess($command, $path = null)
2121
{
2222
$path = $path ?? getcwd();
2323

24-
$process = new Process([$command], $path);
25-
$process->setTimeout(300);
24+
$process = (Process::fromShellCommandline($command, $path))->setTimeout(null);
25+
26+
if ('\\' !== DIRECTORY_SEPARATOR && file_exists('/dev/tty') && is_readable('/dev/tty')) {
27+
$process->setTty(true);
28+
}
29+
2630
$process->run();
31+
/*
32+
$process->run(function ($type, $line) {
33+
$this->output->write($line);
34+
});
35+
*/
2736

2837
if (! $process->isSuccessful()) {
2938
throw new RuntimeException($process->getErrorOutput());

0 commit comments

Comments
 (0)