diff --git a/scripts/lib/action.fish b/scripts/lib/action.fish index 87969e77..dc2e3fdb 100644 --- a/scripts/lib/action.fish +++ b/scripts/lib/action.fish @@ -48,7 +48,7 @@ function runSetupUserAction -V dir set -l cmdline (cat /proc/$fish_pid/cmdline | string split0) if [ (id -u) -ne 0 ] - sudo --set-home --preserve-env $cmdline + sudo --set-home --preserve-env env "PATH=$PATH" $cmdline else if [ -z "$TMUX" ] tmux new-session -e "$env" $cmdline @@ -70,7 +70,7 @@ function runSetupUserAction -V dir echo "$name ALL=(ALL:ALL) NOPASSWD: ALL" end >"$sudoConfig" - and sudo --preserve-env --set-home --user "$name" $cmdline + and sudo --preserve-env --set-home --user "$name" env "PATH=$PATH" $cmdline disposeAction rm "$sudoConfig" userdel -rf "$name"