Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions cli/valet.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,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
Expand Down