From: Chris Koeritz Date: Wed, 29 Sep 2021 20:08:28 +0000 (-0400) Subject: added OLD_HOME variable pointing to HOME before sudo X-Git-Tag: 2.140.128~1^2~2 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=fe82c8a4d06fcb3c284310ccc585ea6ad4d5230a;p=feisty_meow.git added OLD_HOME variable pointing to HOME before sudo makes it a bit easier to get back to the "real" user's home dir who started the sudo. --- diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 8c9c0b2a..8ad72ccf 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -466,9 +466,9 @@ if [ -z "$skip_all" ]; then # launch sudo with just the variables we want to reach the other side. local varmods= -# varmods+="PATH= " + varmods+="OLD_HOME=$HOME " if [ ! -z "$IMPORTED_XAUTH" ]; then varmods+="IMPORTED_XAUTH=$IMPORTED_XAUTH "; fi - if [ ! -z "$SSH_AUTH_SOCK" ]; then varmods+="SSH_AUTH_SOCK=$SSH_AUTH_SOCK"; fi + if [ ! -z "$SSH_AUTH_SOCK" ]; then varmods+="SSH_AUTH_SOCK=$SSH_AUTH_SOCK "; fi /usr/bin/sudo $varmods "$@" retval=$?