cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 5182453bdd7b5fbed6dc808a9ff30cc052a2815d
parent cfd89766d22f070ff5cb92cbc259ef2184f2586b
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Wed, 29 Jan 2020 13:24:49 +0200

kiss: Don't show prompts if root already

Diffstat:
Mkiss | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/kiss b/kiss @@ -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