From 48cc4561c785c359b47e6ca0c89629e0bfdc2503 Mon Sep 17 00:00:00 2001 From: Ethan Dye Date: Wed, 8 Jul 2020 11:44:23 -0600 Subject: [PATCH] Fix broken code in Node-RED install There was a minor error in the code for Node-RED installation following #938. This corrects that error. Signed-off-by: Ethan Dye --- functions/nodejs-apps.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/nodejs-apps.bash b/functions/nodejs-apps.bash index 3ca583c6d..644b8656f 100644 --- a/functions/nodejs-apps.bash +++ b/functions/nodejs-apps.bash @@ -74,7 +74,7 @@ nodered_setup() { local temp - if ! dpkg -s 'build-essential' > /dev/null 2>&1; then + if ! dpkg -s 'build-essential' &> /dev/null; then echo -n "$(timestamp) [openHABian] Installing Node-RED required packages (build-essential)... " if cond_redirect apt-get install --yes build-essential; then echo "OK"; else echo "FAILED"; return 1; fi fi @@ -101,7 +101,7 @@ nodered_setup() { if ! cond_redirect npm install -g node-red-contrib-bigtimer; then echo "FAILED (install bigtimer addon)"; return 1; fi if ! cond_redirect npm update -g node-red-contrib-bigtimer; then echo "FAILED (update bigtimer addon)"; return 1; fi if ! cond_redirect npm install -g node-red-contrib-openhab2; then echo "FAILED (install openhab2 addon)"; return 1; fi - if cond_redirect npm update -g node-red-contrib-bigtimer; then echo "OK"; else echo "FAILED (update bigtimer addon)"; return 1; fi + if cond_redirect npm update -g node-red-contrib-openhab2; then echo "OK"; else echo "FAILED (update openhab2 addon)"; return 1; fi echo -n "$(timestamp) [openHABian] Setting up Node-RED service... " if ! cond_redirect systemctl enable nodered.service; then echo "FAILED (enable service)"; return 1; fi