Fix a couple of conditions so they work in older dash

This commit is contained in:
Kovid Goyal 2022-02-23 22:33:07 +05:30
parent 5064b5c2b1
commit 2dfea0f213
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -87,7 +87,7 @@ EXEC_CMD
shell_integration_dir="$HOME/SHELL_INTEGRATION_DIR"
login_shell_is_ok() {
if [ -z "$login_shell" ] || [ ! -x "$login_shell" ]; then return 1; fi
if [ -z "$login_shell" -o ! -x "$login_shell" ]; then return 1; fi
case "$login_shell" in
*sh) return 0;
esac
@ -98,7 +98,7 @@ detect_python() {
python=$(command -v python3)
if [ -z "$python" ]; then python=$(command -v python2); fi
if [ -z "$python" ]; then python=python; fi
if [ -z "$python" || ! -x "$python" ]; then return 1; fi
if [ -z "$python" -o ! -x "$python" ]; then return 1; fi
return 0;
}