need to not squash path on post-sudo side
authorChris Koeritz <cak0l@virginia.edu>
Thu, 4 Jun 2020 18:25:02 +0000 (14:25 -0400)
committerChris Koeritz <cak0l@virginia.edu>
Thu, 4 Jun 2020 18:25:02 +0000 (14:25 -0400)
scripts/core/functions.sh

index d392c23410c996b9c5d9273e17eb6cb330c6eb70..ff9fec400ecd37a31028677dca5ee32087c591a5 100644 (file)
@@ -437,9 +437,8 @@ if [ -z "$skip_all" ]; then
     fi
 
     # launch sudo with just the variables we want to reach the other side.
-    # we take an extra step to null out the PATH, since MacOS seems to want
-    # to pass that even for a login shell (-i) somehow.
-    local varmods="PATH= "
+    local varmods=
+#    varmods+="PATH= "
     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
     /usr/bin/sudo $varmods "$@"