Added check to ensure volume is directory

ADDED - Present user with error when attempting to pass non-directory as volume
This commit is contained in:
Levi Muniz 2020-07-06 15:57:30 -06:00
parent 93bf4a79d4
commit 3cb5a0b6fd
No known key found for this signature in database
GPG key ID: 1003C39B6E338137

View file

@ -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