Fix regression in launching executables as command line arguments without full paths

This commit is contained in:
Kovid Goyal 2021-03-17 14:32:43 +05:30
parent 37e3e29c8c
commit ba2efaacd8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -293,6 +293,10 @@ class Tab: # {{{
cmd = self.args.args or resolved_shell(self.opts)
if check_for_suitability:
old_exe = cmd[0]
if not os.path.isabs(old_exe):
import shutil
actual_exe = shutil.which(old_exe)
old_exe = actual_exe if actual_exe else os.path.abspath(old_exe)
try:
is_executable = os.access(old_exe, os.X_OK)
except OSError: