File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 14
14
15
15
import argparse
16
16
import os
17
+ import pipes
17
18
import shutil
18
19
import subprocess
19
20
import sys
@@ -57,8 +58,9 @@ def main():
57
58
else :
58
59
shutil .copy2 (dep , args .execdir )
59
60
60
- # Run the executable with the given environment in the execution directory.
61
- return subprocess .call (' ' .join (remaining ), cwd = args .execdir , env = env , shell = True )
61
+ # Run the command line with the given environment in the execution directory.
62
+ commandLine = (pipes .quote (x ) for x in remaining )
63
+ return subprocess .call (' ' .join (commandLine ), cwd = args .execdir , env = env , shell = True )
62
64
finally :
63
65
shutil .rmtree (args .execdir )
64
66
Original file line number Diff line number Diff line change 15
15
16
16
import argparse
17
17
import os
18
+ import pipes
18
19
import posixpath
19
20
import subprocess
20
21
import sys
@@ -97,10 +98,11 @@ def main():
97
98
# host by transforming the path of test-executables to their path in the
98
99
# temporary directory, where we know they have been copied when we handled
99
100
# test dependencies above.
101
+ commandLine = (pathOnRemote (x ) if isTestExe (x ) else x for x in commandLine )
100
102
remoteCommands += [
101
103
'cd {}' .format (tmp ),
102
104
'export {}' .format (' ' .join (args .env )),
103
- ' ' .join (pathOnRemote (x ) if isTestExe ( x ) else x for x in commandLine )
105
+ ' ' .join (pipes . quote (x ) for x in commandLine )
104
106
]
105
107
106
108
# Finally, SSH to the remote host and execute all the commands.
You can’t perform that action at this time.
0 commit comments