From 7a5a7867649db5fe7b698a6bf9f625edc8e3e366 Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Wed, 1 Jul 2020 14:43:48 -0500 Subject: [PATCH] Use -C with all git commands --- lib/buildFileList.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/buildFileList.sh b/lib/buildFileList.sh index 96127e73..60ca0f8f 100755 --- a/lib/buildFileList.sh +++ b/lib/buildFileList.sh @@ -26,7 +26,7 @@ function BuildFileList() ################################################################################# # Switch codebase back to the default branch to get a list of all files changed # ################################################################################# - SWITCH_CMD=$(cd "$GITHUB_WORKSPACE" || exit; git pull --quiet; git checkout "$DEFAULT_BRANCH" 2>&1) + SWITCH_CMD=$(git -C "$GITHUB_WORKSPACE" pull --quiet; git -C "$GITHUB_WORKSPACE" checkout "$DEFAULT_BRANCH" 2>&1) ####################### # Load the error code # @@ -417,7 +417,7 @@ function BuildFileList() ######################################### # Need to switch back to branch of code # ######################################### - SWITCH2_CMD=$(cd "$GITHUB_WORKSPACE" || exit; git checkout --progress --force "$GITHUB_SHA" 2>&1) + SWITCH2_CMD=$(git -C "$GITHUB_WORKSPACE" checkout --progress --force "$GITHUB_SHA" 2>&1) ####################### # Load the error code #