@@ -121,14 +121,19 @@ def close(self):
121121 self ._outf .close ()
122122
123123 if self ._args .version and None == self ._versionScript :
124- cmd = "'%(lcov)s' -a '%(info)s' -o '%(info)s' --version-script '%(vers)s' %(checksum)s--rc compute_file_version=1 --branch-coverage --ignore inconsistent" % {
125- 'lcov' : os .path .join (os .path .split (sys .argv [0 ])[0 ], 'lcov' ),
126- 'checksum' : "--checksum " if self ._args .checksum else '' ,
127- 'info' : self ._args .output ,
128- 'vers' : self ._args .version ,
129- }
124+ lcov = os .path .join (os .path .split (sys .argv [0 ])[0 ], 'lcov' )
125+ cmd = [
126+ lcov ,
127+ "-a" , self ._args .output ,
128+ "-o" , self ._args .output ,
129+ "--version-script" , self ._args .version ,
130+ * (["--checksum" ] if self ._args .checksum else []),
131+ "--rc" , "compute_file_version=1" ,
132+ "--branch-coverage" ,
133+ "--ignore" , "inconsistent" ,
134+ ]
130135 try :
131- x = subprocess .run (cmd , shell = True , check = True , stdout = True , stderr = True )
136+ x = subprocess .run (cmd , shell = False , check = True , stdout = True , stderr = True )
132137 except subprocess .CalledProcessError as err :
133138 print ("Error during lcov version append operation: %s" % (
134139 str (err )))
0 commit comments