From 096a806b74a848156d23950b316b924ca5237fab Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 16 Aug 2022 10:02:32 -0500 Subject: [PATCH] fix(action): Generalize safe directory --- docker/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 44ddb84..a4c784d 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -12,7 +12,7 @@ CMD_NAME="typos" TARGET=${INPUT_FILES:-"."} if [[ -n "${GITHUB_BASE_REF:-}" ]]; then BASE_REF=HEAD~ # HACK: GITHUB_BASE_REF is failing the `--verify` but `HEAD~ should be the same for pull requests - git config --global --add safe.directory /github/workspace + git config --global --add safe.directory "$PWD" if git rev-parse --verify ${BASE_REF} 2>/dev/null ; then log "Limiting checks to ${GITHUB_BASE_REF}...HEAD" TARGET=$(git diff ${BASE_REF}...HEAD --name-only --diff-filter=AM -- ${TARGET})