Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix: enhance error handling and warnings for CDN URL replacement in standalone entrypoint

Victor Santos93bfdcad2802
diff --git a/standalone-entrypoint.sh b/standalone-entrypoint.sh
index 9d274dc7d5..37f0475f58 100755
--- a/standalone-entrypoint.sh
+++ b/standalone-entrypoint.sh
@@ -3,9 +3,13 @@
update-ca-certificates
if [ -d "/backend/frontend-build/assets" ]; then
- cd /backend/frontend-build
- /backend/scripts/replace-standalone-build-variable.sh "__INFISICAL_CDN_URL__" "${CDN_URL:-}"
- cd /backend
+ cd /backend/frontend-build || { echo "ERROR: Failed to cd to frontend-build"; exit 1; }
+
+ if ! /backend/scripts/replace-standalone-build-variable.sh "__INFISICAL_CDN_URL__" "${CDN_URL:-}"; then
+ echo "WARNING: CDN URL replacement failed, assets may not load correctly"
+ fi
+
+ cd /backend || { echo "ERROR: Failed to cd to backend"; exit 1; }
fi
exec node --enable-source-maps dist/main.mjs