1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-04 16:10:08 +01:00

Merge pull request #893 from drbyte/trust-off-flag

Add --off option for valet trust command
This commit is contained in:
Matt Stauffer
2020-01-06 13:56:34 -05:00
committed by GitHub

View File

@@ -415,12 +415,21 @@
/**
* Install the sudoers.d entries so password is no longer required.
*/
$app->command('trust', function () {
$app->command('trust [--off]', function ($off) {
if ($off) {
Brew::removeSudoersEntry();
Valet::removeSudoersEntry();
return info('Sudoers entries have been removed for Brew and Valet.');
}
Brew::createSudoersEntry();
Valet::createSudoersEntry();
info('Sudoers entries have been added for Brew and Valet.');
})->descriptions('Add sudoers files for Brew and Valet to make Valet commands run without passwords');
})->descriptions('Add sudoers files for Brew and Valet to make Valet commands run without passwords', [
'--off' => 'Remove the sudoers files so normal sudo password prompts are required.'
]);
/**
* Allow the user to change the version of php valet uses