Skip to content

Commit be5a5f2

Browse files
committed
Fix handling PathLike in subprocess on Windows
1 parent 02eddfc commit be5a5f2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

graalpython/lib-python/3/subprocess.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,6 +1814,8 @@ def _execute_child(self, args, executable, preexec_fn, close_fds,
18141814

18151815
# Truffle change
18161816
if sys.platform == 'win32':
1817+
if len(args) == 1 and isinstance(args[0], os.PathLike):
1818+
args = [os.fspath(args[0])]
18171819
if executable is None and len(args) == 1:
18181820
import shlex
18191821
executable = next(shlex.shlex(list2cmdline(args)))

0 commit comments

Comments
 (0)