From 2dfea0f21355a3903ad2068d71079d6a2f3a9cad Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 23 Feb 2022 22:33:07 +0530 Subject: [PATCH] Fix a couple of conditions so they work in older dash --- shell-integration/ssh/bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell-integration/ssh/bootstrap.sh b/shell-integration/ssh/bootstrap.sh index a63b24d95..95046743c 100644 --- a/shell-integration/ssh/bootstrap.sh +++ b/shell-integration/ssh/bootstrap.sh @@ -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; }