From 3cb5a0b6fd4f343bd84f7ada5c014ba92dc738d5 Mon Sep 17 00:00:00 2001 From: Levi Muniz Date: Mon, 6 Jul 2020 15:57:30 -0600 Subject: [PATCH] Added check to ensure volume is directory ADDED - Present user with error when attempting to pass non-directory as volume --- lib/linter.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/linter.sh b/lib/linter.sh index d06d44cc..4fb1f3c4 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -597,6 +597,11 @@ GetGitHubVars() { GITHUB_WORKSPACE="$DEFAULT_WORKSPACE" fi + if [ ! -d "$GITHUB_WORKSPACE" ]; then + echo -e "${NC}${B[R]}${F[W]}ERROR:${NC} Provided volume is not a directory!${NC}" + exit 1 + fi + echo "Linting all files in mapped directory:[$DEFAULT_WORKSPACE]" # No need to touch or set the GITHUB_SHA