Skip to content

Commit

Permalink
Allow g:coverage_script to be relative
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Aug 18, 2020
1 parent d8c29d9 commit 4e5938d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugin/coverage-highlight.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
" File: coverage-highlight.vim
" Author: Marius Gedminas <marius@gedmin.as>
" Version: 3.0
" Last Modified: 2019-08-22
" Version: 3.1
" Last Modified: 2020-08-18

if !exists("g:coverage_script")
let g:coverage_script = ""
Expand Down
3 changes: 2 additions & 1 deletion pythonx/coverage_highlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,9 @@ def find_coverage_file_for(filename):
def run_coverage_report(coverage_script, coverage_dir, args=[]):
print("Running %s report -m %s" % (os.path.relpath(coverage_script), ' '.join(args)))
if os.path.exists(coverage_script):
command = [coverage_script]
command = [os.path.abspath(coverage_script)]
else:
# things like "python3 -m coverage"
command = shlex.split(coverage_script)
output = subprocess.Popen(command + ['report', '-m'] + args,
stdout=subprocess.PIPE,
Expand Down

0 comments on commit 4e5938d

Please sign in to comment.