Fix regression in launching executables as command line arguments without full paths
This commit is contained in:
parent
37e3e29c8c
commit
ba2efaacd8
@ -293,6 +293,10 @@ class Tab: # {{{
|
|||||||
cmd = self.args.args or resolved_shell(self.opts)
|
cmd = self.args.args or resolved_shell(self.opts)
|
||||||
if check_for_suitability:
|
if check_for_suitability:
|
||||||
old_exe = cmd[0]
|
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:
|
try:
|
||||||
is_executable = os.access(old_exe, os.X_OK)
|
is_executable = os.access(old_exe, os.X_OK)
|
||||||
except OSError:
|
except OSError:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user