Skip to content

Commit 04a25e9

Browse files
committed
✨ Auto removal of conflicting node packages on startup
1 parent b763c1c commit 04a25e9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/with-contenv bash
2+
# ==============================================================================
3+
# Community Hass.io Add-ons: Node-RED
4+
# Ensures conflicting Node-RED packages are absent
5+
# ==============================================================================
6+
# shellcheck disable=SC1091
7+
source /usr/lib/hassio-addons/base.sh
8+
9+
cd /config/node-red || hass.die "Could not change directory to Node-RED"
10+
11+
if hass.file_exists "/config/node-red/package.json"; then
12+
npm uninstall \
13+
node-red-contrib-home-assistant \
14+
node-red-contrib-home-assistant-llat \
15+
node-red-contrib-home-assistant-ws \
16+
|| hass.die "Failed un-installing conflicting packages"
17+
fi

0 commit comments

Comments
 (0)