Skip to content

Commit

Permalink
Handle spaces in path/filename. See #350.
Browse files Browse the repository at this point in the history
Signed-off-by:  Henry Cox <[email protected]>
  • Loading branch information
henry2cox committed Dec 18, 2024
1 parent 4da45db commit 0849d87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/py2lcov
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Example:
while os.path.exists(xml):
xml = base + '.xml%d' % suffix
suffix += 1
cmd = 'COVERAGE_FILE=%s %s xml -o %s' % (f, args.cover_cmd, xml)
cmd = "COVERAGE_FILE='%s' '%s' xml -o '%s'" % (f, args.cover_cmd, xml)
try:
#x = subprocess.run(cmd, capture_output=True, shell=True, check=True)
x = subprocess.run(cmd, shell=True, check=True, stdout=True, stderr=True)
Expand Down
2 changes: 1 addition & 1 deletion bin/xml2lcovutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def close(self):
self._outf.close()

if self._args.version and None == self._versionScript:
cmd = "%(lcov)s -a %(info)s -o %(info)s --version-script '%(vers)s' %(checksum)s--rc compute_file_version=1 --branch-coverage --ignore inconsistent" % {
cmd = "'%(lcov)s' -a '%(info)s' -o '%(info)s' --version-script '%(vers)s' %(checksum)s--rc compute_file_version=1 --branch-coverage --ignore inconsistent" % {
'lcov': os.path.join(os.path.split(sys.argv[0])[0], 'lcov'),
'checksum': "--checksum " if self._args.checksum else '',
'info': self._args.output,
Expand Down

0 comments on commit 0849d87

Please sign in to comment.