Skip to content

Commit 7b005cb

Browse files
authored
fix: node_modules dir removed on plugin update (#1406)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Improved installation process by automatically cleaning up old package directories before installing or upgrading the package. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent b625227 commit 7b005cb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

plugin/plugins/dynamix.unraid.net.plg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,13 @@ for txz_file in /boot/config/plugins/dynamix.my.servers/dynamix.unraid.net-*.txz
235235
fi
236236
done
237237
238+
# Remove existing node_modules directory
239+
echo "Cleaning up existing node_modules directory..."
240+
if [ -d "/usr/local/unraid-api/node_modules" ]; then
241+
echo "Removing: /usr/local/unraid-api/node_modules"
242+
rm -rf "/usr/local/unraid-api/node_modules"
243+
fi
244+
238245
# Install the package using the explicit file path
239246
upgradepkg --install-new --reinstall "${PKG_FILE}"
240247
if [ $? -ne 0 ]; then

0 commit comments

Comments
 (0)