cpt

Carbs Packaging Tools
git clone git://git.carbslinux.org/cpt
Log | Files | Refs | README | LICENSE

commit cdcaff227d81891c4fd5628221ee68b5d4edbbb3
parent be6d8b8a5722293e89d9ec7e6d196421e2d5037a
Author: Cem Keylan <cem@ckyln.com>
Date:   Sun,  3 Jan 2021 13:13:13 +0300

as_root(): add `sls` to accepted root tools

Diffstat:
Msrc/cpt-lib.in | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/cpt-lib.in b/src/cpt-lib.in @@ -389,7 +389,7 @@ as_root() { "$@" case ${su##*/} in - sudo|doas) "$su" -u "$user" -- env "$@" ;; + sls|sudo|doas) "$su" -u "$user" -- env "$@" ;; su) su -c "env $* <&3" "$user" 3<&0 </dev/tty ;; *) die "Invalid CPT_SU value: $su" ;; esac @@ -1867,7 +1867,9 @@ create_cache() { # Figure out which 'sudo' command to use based on the user's choice or # what is available on the system. - su=${CPT_SU:-$(command -v sudo || command -v doas)} || su=su + su=${CPT_SU:-$(command -v sls || + command -v sudo || + command -v doas)} || su=su # Store the date and time of script invocation to be used as the name # of the log files the package manager creates uring builds.