Skip to content

Commit ef1fc19

Browse files
committed
rth: quote the commandline properly on Windows (NFC)
This is purely for debugging purposes. Use the subprocess.list2cmd function to get a command line quoted for Windows quoting rules. NFC
1 parent 7beb358 commit ef1fc19

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

utils/rth

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ VERBOSE = True
2525

2626
def verbose_print_command(command):
2727
if VERBOSE:
28-
print(" ".join(pipes.quote(c) for c in command))
28+
if platform.system() == 'Windows':
29+
print(subprocess.list2cmdline(command))
30+
else:
31+
print(" ".join(pipes.quote(c) for c in command))
2932
sys.stdout.flush()
3033

3134

0 commit comments

Comments
 (0)