From ba2efaacd89029d06891b68903ab4b712df0d599 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 17 Mar 2021 14:32:43 +0530 Subject: [PATCH] Fix regression in launching executables as command line arguments without full paths --- kitty/tabs.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kitty/tabs.py b/kitty/tabs.py index ca2f0f445..c83bb66a5 100644 --- a/kitty/tabs.py +++ b/kitty/tabs.py @@ -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: