mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 06:36:24 +00:00
Fix regression in launching executables as command line arguments without full paths
This commit is contained in:
parent
37e3e29c8c
commit
ba2efaacd8
1 changed files with 4 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue