From 4615b4e559158a2864ec294f4c19d777ac9e3b17 Mon Sep 17 00:00:00 2001 From: Andrii Bratanin Date: Thu, 4 Sep 2025 02:13:50 +0300 Subject: [PATCH] Fix fix_permissions.sh failing on chown/chgrp This commit fixes https://github.com/vegardit/docker-gitea-act-runner/issues/82 --- image/fix_permissions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/image/fix_permissions.sh b/image/fix_permissions.sh index f97b143..3f1d09d 100644 --- a/image/fix_permissions.sh +++ b/image/fix_permissions.sh @@ -26,7 +26,7 @@ if [[ -n ${GITEA_RUNNER_UID:-} ]]; then act_home=$(eval echo "~$act_user") chown "$GITEA_RUNNER_UID" "$act_home" - find "$act_home" -xdev -user "$effective_uid" -print0 | xargs -0 chown "$GITEA_RUNNER_UID" + find "$act_home" -xdev -user "$effective_uid" -print0 | xargs --no-run-if-empty -0 chown "$GITEA_RUNNER_UID" fi fi @@ -38,7 +38,7 @@ if [[ -n ${GITEA_RUNNER_GID:-} ]]; then act_home=$(eval echo "~$act_user") chown ":$GITEA_RUNNER_GID" "$act_home" - find "$act_home" -xdev -group "$effective_gid" -print0 | xargs -0 chgrp "$GITEA_RUNNER_GID" + find "$act_home" -xdev -group "$effective_gid" -print0 | xargs --no-run-if-empty -0 chgrp "$GITEA_RUNNER_GID" fi fi