Update entrypoint.sh

This commit is contained in:
simonmcnair 2025-05-05 10:02:02 +01:00 committed by GitHub
parent b959dcf21b
commit eed0ad0738
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,6 +28,11 @@ if [ -f "/data/config/comfy/startup.sh" ]; then
popd
fi
# Only chown if not running as root (UID != 0)
if [ "$(id -u)" -ne 0 ]; then
chown -R "$(id -u):$(id -g)" ~ 2>/dev/null || true
fi
chown -R $PUID:$PGID ~/.cache/
chmod 776 ~/.cache/