Skip to content

Commit

Permalink
v9.6
Browse files Browse the repository at this point in the history
- DietPi-Software | Node-RED: Simplify install code, now that installs and reinstalls share the same command
  • Loading branch information
MichaIng committed Jul 5, 2024
1 parent cd7e1c5 commit 52ef406
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -6678,13 +6678,8 @@ _EOF_
# - Disable cache
local cache=$(runuser -u nodered -- mktemp -d)
# - Reinstall: Remove all locally installed modules, to work around update issues, but preserve installed plugins from package.json: https://github.com/MichaIng/DietPi/issues/7128
if [[ -f 'package.json' ]]
then
G_EXEC rm -Rf node_modules .npm/_cacache
G_EXEC_OUTPUT=1 G_EXEC runuser -u nodered -- npm i --cache "$cache" --no-audit node-red@latest
else
G_EXEC_OUTPUT=1 G_EXEC runuser -u nodered -- npm i --cache "$cache" --no-audit node-red
fi
[[ -f 'package.json' ]] && G_EXEC rm -Rf node_modules .npm/_cacache
G_EXEC_OUTPUT=1 G_EXEC runuser -u nodered -- npm i --cache "$cache" --no-audit node-red@latest
G_EXEC rm -R "$cache"
G_EXEC cd "$G_WORKING_DIR"

Expand Down

0 comments on commit 52ef406

Please sign in to comment.