Skip to content

Commit 0849d87

Browse files
committed
Handle spaces in path/filename. See #350.
Signed-off-by: Henry Cox <[email protected]>
1 parent 4da45db commit 0849d87

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bin/py2lcov

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ Example:
191191
while os.path.exists(xml):
192192
xml = base + '.xml%d' % suffix
193193
suffix += 1
194-
cmd = 'COVERAGE_FILE=%s %s xml -o %s' % (f, args.cover_cmd, xml)
194+
cmd = "COVERAGE_FILE='%s' '%s' xml -o '%s'" % (f, args.cover_cmd, xml)
195195
try:
196196
#x = subprocess.run(cmd, capture_output=True, shell=True, check=True)
197197
x = subprocess.run(cmd, shell=True, check=True, stdout=True, stderr=True)

bin/xml2lcovutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ 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" % {
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" % {
125125
'lcov': os.path.join(os.path.split(sys.argv[0])[0], 'lcov'),
126126
'checksum': "--checksum " if self._args.checksum else '',
127127
'info': self._args.output,

0 commit comments

Comments
 (0)