Merge pull request #389 from leviem1/directory-check

Added check to ensure volume is directory
This commit is contained in:
Lukas Gravley 2020-07-06 20:18:16 -05:00 committed by GitHub
commit 1e3df9f7f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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