FIX: remove broken symlinks from removed plugins
authorMichael Brown <supermathie@gmail.com>
Wed, 29 Apr 2020 20:24:29 +0000 (16:24 -0400)
committerMichael Brown <supermathie@gmail.com>
Wed, 29 Apr 2020 20:24:29 +0000 (16:24 -0400)
* 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

templates/web.template.yml

index a60e6ef0c87fe79392889e55ed7d70526e350698..826759fe16e070c929534be7df21c74aea3b3cb0 100644 (file)
@@ -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: