1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-07 01:00:09 +01:00

Merge pull request #502 from laravel/add-trust-option

Add 'trust' command
This commit is contained in:
Matt Stauffer
2018-02-08 15:52:18 -05:00
committed by GitHub
4 changed files with 49 additions and 0 deletions

View File

@@ -197,4 +197,17 @@ function restartLinkedPhp()
{
$this->restartService($this->linkedPhp());
}
/**
* Create the "sudoers.d" entry for running Brew.
*
* @return void
*/
function createSudoersEntry()
{
$this->files->ensureDirExists('/etc/sudoers.d');
$this->files->put('/etc/sudoers.d/brew', 'Cmnd_Alias BREW = /usr/local/bin/brew *
%admin ALL=(root) NOPASSWD: BREW'.PHP_EOL);
}
}

View File

@@ -65,4 +65,17 @@ function onLatestVersion($currentVersion)
return version_compare($currentVersion, trim($response->body->tag_name, 'v'), '>=');
}
/**
* Create the "sudoers.d" entry for running Valet.
*
* @return void
*/
function createSudoersEntry()
{
$this->files->ensureDirExists('/etc/sudoers.d');
$this->files->put('/etc/sudoers.d/valet', 'Cmnd_Alias VALET = /usr/local/bin/valet *
%admin ALL=(root) NOPASSWD: VALET'.PHP_EOL);
}
}