Ensure container starts if it is mounted with an empty /modules directory. (#30699)

* Set nullglob

* Replace with a if statement (because we're using sh)

* combine if
This commit is contained in:
Will Hunt
2025-09-04 17:11:50 +01:00
committed by GitHub
parent 1386bc9f5c
commit 1c30bec083

View File

@@ -14,10 +14,9 @@ entrypoint_log() {
mkdir -p /tmp/element-web-config
cp /app/config*.json /tmp/element-web-config/
# If there are modules to be loaded
if [ -d "/modules" ]; then
# If the module directory exists AND the module directory has modules in it
if [ -d "/modules" ] && [ "$( ls -A '/modules' )" ]; then
cd /modules
for MODULE in *
do
# If the module has a package.json, use its main field as the entrypoint