fix: fix_permissions.sh fails on empty directory (#83)
This commit fixes https://github.com/vegardit/docker-gitea-act-runner/issues/82
This commit is contained in:
parent
00a1330dab
commit
c035980662
|
|
@ -26,7 +26,7 @@ if [[ -n ${GITEA_RUNNER_UID:-} ]]; then
|
||||||
|
|
||||||
act_home=$(eval echo "~$act_user")
|
act_home=$(eval echo "~$act_user")
|
||||||
chown "$GITEA_RUNNER_UID" "$act_home"
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -38,7 +38,7 @@ if [[ -n ${GITEA_RUNNER_GID:-} ]]; then
|
||||||
|
|
||||||
act_home=$(eval echo "~$act_user")
|
act_home=$(eval echo "~$act_user")
|
||||||
chown ":$GITEA_RUNNER_GID" "$act_home"
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue