Capture output
parent
066550054b
commit
685ff8699b
|
@ -120,16 +120,16 @@ EOT
|
||||||
|
|
||||||
$process = new ProcessExecutor($this->getIO());
|
$process = new ProcessExecutor($this->getIO());
|
||||||
if (Platform::isWindows()) {
|
if (Platform::isWindows()) {
|
||||||
return $process->execute('start "web" explorer "' . $url . '"');
|
return $process->execute('start "web" explorer "' . $url . '"', $output);
|
||||||
}
|
}
|
||||||
|
|
||||||
$linux = $process->execute('which xdg-open');
|
$linux = $process->execute('which xdg-open', $output);
|
||||||
$osx = $process->execute('which open');
|
$osx = $process->execute('which open', $output);
|
||||||
|
|
||||||
if (0 === $linux) {
|
if (0 === $linux) {
|
||||||
$process->execute('xdg-open ' . $url);
|
$process->execute('xdg-open ' . $url, $output);
|
||||||
} elseif (0 === $osx) {
|
} elseif (0 === $osx) {
|
||||||
$process->execute('open ' . $url);
|
$process->execute('open ' . $url, $output);
|
||||||
} else {
|
} else {
|
||||||
$this->getIO()->writeError('No suitable browser opening command found, open yourself: ' . $url);
|
$this->getIO()->writeError('No suitable browser opening command found, open yourself: ' . $url);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue