Skip to content

Commit 3c6f783

Browse files
committed
Munge command strings with shlex
1 parent 3cf7717 commit 3c6f783

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

installer/build_server.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@
3030

3131
import datetime
3232
import platform
33-
import shutil
3433
import re
34+
import shutil
35+
import shlex
3536
import stat
3637
import subprocess
3738
import sysconfig
@@ -80,7 +81,7 @@ def output(line):
8081

8182
def run_command(command, working_dir=None):
8283
"""Utility function to return output from command line"""
83-
short_command = command.split('" ')[0] # We don't need to print args
84+
short_command = shlex.split(command)[0] # We don't need to print args
8485
output("Running %s... (%s)" % (short_command, working_dir))
8586
p = subprocess.Popen(
8687
command,

0 commit comments

Comments
 (0)