From 4fe8020a77b6f1271aaf2aee38c0bd48fe7ca99e Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Sat, 14 Apr 2018 17:26:58 -0700 Subject: [PATCH] Allow opening coverage report on Linux systems too --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0d1c31a..b23d769 100644 --- a/Makefile +++ b/Makefile @@ -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