kiss: better fix for su

This commit is contained in:
Dylan Araps 2021-07-19 21:22:49 +03:00
parent 3f889ac262
commit 3820e00e32
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C
1 changed files with 2 additions and 1 deletions

3
kiss
View File

@ -131,7 +131,7 @@ as_user() {
printf 'Using '%s' (to become %s)\n' "$cmd_su" "$user"
case ${cmd_su##*/} in
su) "$cmd_su" -c "$* <&3" - "$user" 3<&0 </dev/tty ;;
su) "$cmd_su" -c "$* <&3" "$user" 3<&0 </dev/tty ;;
*) "$cmd_su" -u "$user" -- "$@"
esac
}
@ -1696,6 +1696,7 @@ args() {
case $action in a|alternatives|i|install|r|remove)
if ok "$1" && ! am_owner "$KISS_ROOT/"; then
as_user env \
LOGNAME="$user" \
HOME="$HOME" \
XDG_CACHE_HOME="$XDG_CACHE_HOME" \
KISS_COMPRESS="$KISS_COMPRESS" \