More robust check for exec -a support
This commit is contained in:
parent
14d391cc2e
commit
85c6d8f16e
@ -338,9 +338,6 @@ esac
|
|||||||
# We need to pass the first argument to the executed program with a leading -
|
# We need to pass the first argument to the executed program with a leading -
|
||||||
# to make sure the shell executes as a login shell. Note that not all shells
|
# to make sure the shell executes as a login shell. Note that not all shells
|
||||||
# support exec -a so we use the below to try to detect such shells
|
# support exec -a so we use the below to try to detect such shells
|
||||||
if [ -z "$PIPESTATUS$pipestatus" ]; then
|
[ "$(exec -a echo echo OK 2> /dev/null)" = "OK" ] && exec -a "-$shell_name" $login_shell
|
||||||
# the dash shell does not support exec -a and also does not define PIPESTATUS
|
|
||||||
execute_with_python
|
execute_with_python
|
||||||
exec $login_shell "-l"
|
exec $login_shell "-l"
|
||||||
fi
|
|
||||||
exec -a "-$shell_name" $login_shell
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user