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

Add 'trust' command

This commit is contained in:
Matt Stauffer
2018-01-04 16:36:16 -05:00
parent 5df7ed7a1a
commit 6587fb53a5
4 changed files with 49 additions and 0 deletions

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);
}
}