Fixhancement: improve UID support (#5963)

This commit is contained in:
shamoon
2025-11-11 08:56:44 -08:00
committed by GitHub
parent 0dafc792f7
commit 8a75c9b6e3
2 changed files with 4 additions and 2 deletions

View File

@@ -57,8 +57,8 @@ if [ -d /app/.next ]; then
fi
# Drop privileges (when asked to) if root, otherwise run as current user
if [ "$(id -u)" == "0" ] && [ "${PUID}" != "0" ]; then
su-exec ${PUID}:${PGID} "$@"
if [ "$(id -u)" = "0" ] && [ "${PUID}" != "0" ]; then
exec su-exec ${PUID}:${PGID} "$@"
else
exec "$@"
fi