Preserve PATH
for setup actions
This commit is contained in:
parent
af07ed66db
commit
f729776d1f
1 changed files with 2 additions and 2 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue