diff --git a/.ci/go-no-os-exit.sh b/.ci/go-no-os-exit.sh index efac2835a..b429ed5a4 100755 --- a/.ci/go-no-os-exit.sh +++ b/.ci/go-no-os-exit.sh @@ -6,7 +6,9 @@ # Check there are no os.Exit() calls creeping into the code # We don't use that exit path in the Kata codebase. -go_packages=. +# Allow the path to check to be over-ridden. +# Default to the current directory. +go_packages=${1:-.} echo "Checking for no os.Exit() calls for package [${go_packages}]" diff --git a/Makefile b/Makefile index 10a7f851d..cf68c09bc 100644 --- a/Makefile +++ b/Makefile @@ -395,7 +395,8 @@ go-test: $(GENERATED_FILES) check-go-static: $(QUIET_CHECK).ci/static-checks.sh - $(QUIET_CHECK).ci/go-no-os-exit.sh + $(QUIET_CHECK).ci/go-no-os-exit.sh ./cli + $(QUIET_CHECK).ci/go-no-os-exit.sh ./virtcontainers coverage: $(QUIET_TEST).ci/go-test.sh html-coverage