Allow opening coverage report on Linux systems too

This commit is contained in:
IamTheFij 2018-04-14 17:26:58 -07:00
parent 09fc0f6156
commit 4fe8020a77
1 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,5 @@
OPEN_CMD := $(shell type xdg-open > /dev/null && echo 'xdg-open' || echo 'open')
.PHONY: default
default: test
@ -74,7 +76,7 @@ install-hooks: env
htmlcov/index.html: .coverage
./env/bin/coverage html
# Opens coverage html in browser (on macOS)
# Opens coverage html in browser (on macOS and some Linux systems)
.PHONY: open-coverage
open-coverage: htmlcov/index.html
open htmlcov/index.html
$(OPEN_CMD) htmlcov/index.html