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 @@ def launch_child(
|
|||
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…
Reference in a new issue