From 90a1f525b04a6ffde616805c902e8f6a37217e38 Mon Sep 17 00:00:00 2001 From: Justin Grote Date: Fri, 19 Jun 2020 17:31:53 +0000 Subject: [PATCH] Feat: Make GITHUB_WORKSPACE overridable in RUN_LOCAL Mode --- lib/linter.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/linter.sh b/lib/linter.sh index 473f53cd..6a81206f 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -579,6 +579,14 @@ GetGitHubVars() ########################################## echo "NOTE: ENV VAR [RUN_LOCAL] has been set to:[true]" echo "bypassing GitHub Actions variables..." + + ############################ + # Set the GITHUB_WORKSPACE # + ############################ + if [ -z "$GITHUB_WORKSPACE" ]; then + GITHUB_WORKSPACE="$DEFAULT_WORKSPACE" + fi + echo "Linting all files in mapped directory:[$DEFAULT_WORKSPACE]" # No need to touch or set the GITHUB_SHA @@ -586,10 +594,6 @@ GetGitHubVars() # No need to touch or set the GITHUB_ORG # No need to touch or set the GITHUB_REPO - ############################ - # Set the GITHUB_WORKSPACE # - ############################ - GITHUB_WORKSPACE="$DEFAULT_WORKSPACE" ################################# # Set the VALIDATE_ALL_CODEBASE #