Skip to content

Commit b7038bc

Browse files
committed
run from pwd
1 parent 4ceac1d commit b7038bc

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

codecov/__init__.py

+4-9
Original file line numberDiff line numberDiff line change
@@ -482,16 +482,11 @@ def main(*argv, **kwargs):
482482
else:
483483
# Call `coverage xml` when .coverage exists
484484
# -----------------------------------------
485-
if os.path.exists(opj(root, '.coverage')) and not os.path.exists(opj(root, 'coverage.xml')):
486-
write(' Calling coverage xml')
485+
# Ran from current directory
486+
if os.path.exists(opj(os.getcwd(), '.coverage')) and not os.path.exists(opj(os.getcwd(), 'coverage.xml')):
487+
write(' Calling $ coverage xml')
487488
try_to_run('coverage xml')
488-
if os.path.exists(opj(root, 'coverage.xml')):
489-
reports.append(read(opj(root, 'coverage.xml')))
490-
491-
# warn when no reports found and is python
492-
if len(reports) == 0:
493-
# TODO send `coverage debug sys`
494-
write(" No reports found. You may need to add a coverage config file. Visit http://bit.ly/1slucpy for configuration help.")
489+
reports.append(read(opj(root, 'coverage.xml')))
495490

496491
reports = list(filter(bool, reports))
497492
assert len(reports) > 0, "No coverage report found"

0 commit comments

Comments
 (0)