From: Antonio Ospite Date: Sat, 10 Mar 2018 21:15:24 +0000 (+0100) Subject: clean.sh: make sudo always ask for the password X-Git-Tag: v0.1.2~14 X-Git-Url: https://git.ao2.it/drupal-init-tools.git/commitdiff_plain/9623d6a97b2569706649c4f19f9bac7fd4bba4ff?hp=cd743defc40ca012b819aac0d40feeffefdc79db clean.sh: make sudo always ask for the password Passing the --reset-timestamp option to sudo makes it ignore the cached credentials and always ask for a password. This is done to provide the user a second chance to think about what they are doing, as the removal can be fairly destructive for a development site. --- diff --git a/libexec/clean.sh b/libexec/clean.sh index b1b4c16..794e221 100755 --- a/libexec/clean.sh +++ b/libexec/clean.sh @@ -57,4 +57,4 @@ run() { "$@" } -[ "$INPUT" = "$CONFIRMATION_STRING" ] && run sudo rm -rf config/ web/ vendor/ composer.lock +[ "$INPUT" = "$CONFIRMATION_STRING" ] && run sudo --reset-timestamp rm -rf config/ web/ vendor/ composer.lock