From d923938804ae6a6bdc6b944e8b732961ef11b9c6 Mon Sep 17 00:00:00 2001 From: Kin Fai Tse Date: Sun, 5 Nov 2023 12:29:52 +0800 Subject: [PATCH] Change WORKDIR in script, not relying on docker run -w by user (#4821) * fix: #4459 * add exit code * misc fix --- lib/linter.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/linter.sh b/lib/linter.sh index 4e1b171b..f2a8a36c 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -500,7 +500,9 @@ GetGitHubVars() { fatal "Provided volume is not a directory!" fi - info "Linting all files in mapped directory:[${DEFAULT_WORKSPACE}]" + info "Linting all files in mapped directory:[${GITHUB_WORKSPACE}]" + + pushd "${GITHUB_WORKSPACE}" >/dev/null || exit 1 # No need to touch or set the GITHUB_SHA # No need to touch or set the GITHUB_EVENT_PATH