Skip to content

Commit 1d7a9df

Browse files
authored
Merge pull request #1025 from drbyte/bin-dir-symlink
Fix valet bin dir linking for ARM / M1 macs
2 parents 3567612 + 383c1d0 commit 1d7a9df

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cli/Valet/Valet.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Valet
88
{
99
var $cli, $files;
1010

11-
var $valetBin = '/usr/local/bin/valet';
11+
var $valetBin = BREW_PREFIX.'/bin/valet';
1212

1313
/**
1414
* Create a new Valet instance.
@@ -88,7 +88,7 @@ function createSudoersEntry()
8888
{
8989
$this->files->ensureDirExists('/etc/sudoers.d');
9090

91-
$this->files->put('/etc/sudoers.d/valet', 'Cmnd_Alias VALET = /usr/local/bin/valet *
91+
$this->files->put('/etc/sudoers.d/valet', 'Cmnd_Alias VALET = '.BREW_PREFIX.'/bin/valet *
9292
%admin ALL=(root) NOPASSWD:SETENV: VALET'.PHP_EOL);
9393
}
9494

cli/valet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@
372372
Thus, you may need to delete things from your <info>~/.composer/composer.json</info> file before running <info>composer global update</info> successfully.
373373
Then to finish removing any Composer fragments of Valet:
374374
Run <info>composer global remove laravel/valet</info>
375-
and then <info>rm /usr/local/bin/valet</info> to remove the Valet bin link if it still exists.
375+
and then <info>rm ".BREW_PREFIX."/bin/valet</info> to remove the Valet bin link if it still exists.
376376
Optional:
377377
- <info>brew list --formula</info> will show any other Homebrew services installed, in case you want to make changes to those as well.
378378
- <info>brew doctor</info> can indicate if there might be any broken things left behind.

0 commit comments

Comments
 (0)