FIX: remove broken symlinks from removed plugins

FIX: remove broken symlinks from removed plugins

  • if plugins have been removed or renamed, we end up with a dangling symlink in this directory
  • this causes the build to fail later during a chown
diff --git a/templates/web.template.yml b/templates/web.template.yml
index a60e6ef..826759f 100644
--- a/templates/web.template.yml
+++ b/templates/web.template.yml
@@ -103,6 +103,8 @@ run:
         - bash -c "mkdir -p           /shared/tmp/{backups,restores}"
         - bash -c "ln    -s           /shared/tmp/{backups,restores} $home/tmp"
         - chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp
+        # scrub broken symlinks from plugins that have been removed
+        - find public/plugins/ -maxdepth 1 -xtype l -delete
 
   - exec:
       cmd:

GitHub sha: d587158a

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/internet-explorer-plugin-folder-location-potentially-causes-issues-when-upgrading-via-docker-manager/149840/3