Skip to content

Commit 4f702b7

Browse files
RiotRobotHalf-Shot
andauthored
Ensure container starts if it is mounted with an empty /modules directory. (#30699) (#30705)
* Set nullglob * Replace with a if statement (because we're using sh) * combine if (cherry picked from commit 1c30bec) Co-authored-by: Will Hunt <[email protected]>
1 parent 9f15532 commit 4f702b7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

docker/docker-entrypoint.d/18-load-element-modules.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ entrypoint_log() {
1414
mkdir -p /tmp/element-web-config
1515
cp /app/config*.json /tmp/element-web-config/
1616

17-
# If there are modules to be loaded
18-
if [ -d "/modules" ]; then
17+
# If the module directory exists AND the module directory has modules in it
18+
if [ -d "/modules" ] && [ "$( ls -A '/modules' )" ]; then
1919
cd /modules
20-
2120
for MODULE in *
2221
do
2322
# If the module has a package.json, use its main field as the entrypoint

0 commit comments

Comments
 (0)