We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a08695d + f1ba01a commit ee805a9Copy full SHA for ee805a9
python/subunit/__init__.py
@@ -913,7 +913,12 @@ def debug(self):
913
914
def _run(self, result):
915
protocol = TestProtocolServer(result)
916
- process = subprocess.Popen(self.script, shell=True, stdout=subprocess.PIPE)
+ # Explicitly invoke Python to run the script instead of relying on
917
+ # execute permissions, which may not be preserved during installation
918
+ import shlex
919
+
920
+ script_parts = shlex.split(self.script)
921
+ process = subprocess.Popen([sys.executable] + script_parts, stdout=subprocess.PIPE)
922
make_stream_binary(process.stdout)
923
output = process.communicate()[0]
924
protocol.readFrom(BytesIO(output))
0 commit comments