kiss: Don't show prompts if root already

This commit is contained in:
Dylan Araps 2020-01-29 13:24:49 +02:00
parent cfd89766d2
commit 5182453bdd
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 5 additions and 0 deletions

5
kiss
View File

@ -74,6 +74,11 @@ root_cache() {
#
# This change was needed as the existing behavior was not ideal
# in any way and needed to be fixed.
# Pointless running this function if the user has chosen to run
# the package manager as root anyway.
[ "$(id -u)" != 0 ] || return 0
printf 'Password: '
# Disable echoing to the terminal while the password is inputted