fix detection of python when no python2 or python3 links present

This commit is contained in:
Kovid Goyal 2022-02-24 12:54:19 +05:30
parent 53c00ac631
commit 86b15ad693
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -103,7 +103,7 @@ login_shell_is_ok() {
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" ]; then python=$(command -v python); fi
if [ -z "$python" -o ! -x "$python" ]; then return 1; fi
return 0;
}