diff --git a/src/Commands/OpenCommand.php b/src/Commands/OpenCommand.php index 2f7cb295..31fc075f 100644 --- a/src/Commands/OpenCommand.php +++ b/src/Commands/OpenCommand.php @@ -53,6 +53,14 @@ public function handle() )); } - passthru(sprintf('open https://%s', $domain)); + $openerCommand = 'open'; + + if (PHP_OS_FAMILY === 'Windows') { + $openerCommand = 'start'; + } elseif (PHP_OS_FAMILY === 'Linux') { + $openerCommand = 'xdg-open'; + } + + passthru(sprintf('%s https://%s', $openerCommand, $domain)); } }