Skip to content

Commit 0cf47ce

Browse files
committed
Use simpler CommandLine::runAsUser to open the site in the right browser
1 parent 26ae3f1 commit 0cf47ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cli/valet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
$app->command('open [domain]', function ($domain = null) {
186186
$url = "http://".($domain ?: Site::host(getcwd())).'.'.Configuration::read()['domain'];
187187
// Run the 'open' command as the currently logged in user instead of root
188-
passthru('sudo --user=`stat -f%Su /dev/console` open ' . escapeshellarg($url));
188+
CommandLine::runAsUser("open ".escapeshellarg($url));
189189
})->descriptions('Open the site for the current (or specified) directory in your browser');
190190

191191
/**

0 commit comments

Comments
 (0)