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)
|
set -l cmdline (cat /proc/$fish_pid/cmdline | string split0)
|
||||||
|
|
||||||
if [ (id -u) -ne 0 ]
|
if [ (id -u) -ne 0 ]
|
||||||
sudo --set-home --preserve-env $cmdline
|
sudo --set-home --preserve-env env "PATH=$PATH" $cmdline
|
||||||
else
|
else
|
||||||
if [ -z "$TMUX" ]
|
if [ -z "$TMUX" ]
|
||||||
tmux new-session -e "$env" $cmdline
|
tmux new-session -e "$env" $cmdline
|
||||||
|
@ -70,7 +70,7 @@ function runSetupUserAction -V dir
|
||||||
echo "$name ALL=(ALL:ALL) NOPASSWD: ALL"
|
echo "$name ALL=(ALL:ALL) NOPASSWD: ALL"
|
||||||
end >"$sudoConfig"
|
end >"$sudoConfig"
|
||||||
|
|
||||||
and sudo --preserve-env --set-home --user "$name" $cmdline
|
and sudo --preserve-env --set-home --user "$name" env "PATH=$PATH" $cmdline
|
||||||
disposeAction
|
disposeAction
|
||||||
rm "$sudoConfig"
|
rm "$sudoConfig"
|
||||||
userdel -rf "$name"
|
userdel -rf "$name"
|
||||||
|
|
Loading…
Reference in a new issue