Skip to content

Commit e3611c2

Browse files
committed
fix: Improve guard that prevents errors when copying a file over itself
1 parent fad7659 commit e3611c2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/actions/gh-cache/cache/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ runs:
3131
RUNNER_WORK_DIR="$(realpath "${GITHUB_WORKSPACE}/../..")"
3232
ACTION_DIR="${RUNNER_WORK_DIR}/_actions/github/accessibility-scanner/current"
3333
mkdir -p "${ACTION_DIR}/.github/actions"
34-
if [ "$(realpath .github/actions)" != "$(realpath "${ACTION_DIR}/.github/actions")" ]; then
34+
if [ "$(realpath "../../../../.github/actions")" != "$(realpath "${ACTION_DIR}/.github/actions")" ]; then
3535
cp -a "../../../../.github/actions/." "${ACTION_DIR}/.github/actions/"
3636
fi
3737
- name: Restore cached value

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ runs:
4747
RUNNER_WORK_DIR="$(realpath "${GITHUB_WORKSPACE}/../..")"
4848
ACTION_DIR="${RUNNER_WORK_DIR}/_actions/github/accessibility-scanner/current"
4949
mkdir -p "${ACTION_DIR}/.github/actions"
50-
if [ "$(realpath .github/actions)" != "$(realpath "${ACTION_DIR}/.github/actions")" ]; then
50+
if [ "$(realpath ".github/actions")" != "$(realpath "${ACTION_DIR}/.github/actions")" ]; then
5151
cp -a ".github/actions/." "${ACTION_DIR}/.github/actions/"
5252
fi
5353
- name: Restore cached results

0 commit comments

Comments
 (0)