fix: allow PUID and PGID to be unset (#656)

This commit is contained in:
Emrik Östling
2026-09-26 02:16:34 +02:00
committed by GitHub
parent cc3d256359
commit 4f0aa1b139
+2 -2
View File
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
set -e
if ! [[ "$PUID" =~ ^[0-9]+$ ]] || ! [[ "$PGID" =~ ^[0-9]+$ ]]; then
echo "[entrypoint] ERROR: PUID and PGID must be numeric integers." >&2
if [[ -n "$PUID" && ! "$PUID" =~ ^[0-9]+$ ]] || [[ -n "$PGID" && ! "$PGID" =~ ^[0-9]+$ ]] || [[ -z "$PUID" && -n "$PGID" ]]; then
echo "[entrypoint] ERROR: PUID and PGID must be numeric integers or unset." >&2
exit 1
fi