Skip to content

Commit

Permalink
ignore stderr if node is not installed before
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinSchiller authored Jan 8, 2024
1 parent 0f4652b commit b952957
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions installation/routines/setup_jukebox_webapp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ NODE_ARMv6_VERSION=v20.10.0
_jukebox_webapp_install_node() {
print_lc " Install NodeJS"

local node_installed=$(node -v)
local node_version_installed=$(node -v 2>/dev/null)
local arch=$(uname -m)
if [[ "$arch" == "armv6l" ]]; then
if [ "$node_installed" == "$NODE_ARMv6_VERSION" ]; then
if [ "$node_version_installed" == "$NODE_ARMv6_VERSION" ]; then
print_lc " Skipping. NodeJS already installed"
else
# For ARMv6 unofficial build
Expand Down Expand Up @@ -49,7 +49,7 @@ _jukebox_webapp_install_node() {
rm -rf "${node_tmp_dir}"
fi
else
if [[ "$node_installed" == "v${NODE_MAJOR}."* ]]; then
if [[ "$node_version_installed" == "v${NODE_MAJOR}."* ]]; then
print_lc " Skipping. NodeJS already installed"
else
sudo apt-get -y remove nodejs
Expand Down Expand Up @@ -119,9 +119,9 @@ _jukebox_webapp_check() {
else
local arch=$(uname -m)
if [[ "$arch" == "armv6l" ]]; then
local node_installed=$(node -v)
local node_version_installed=$(node -v 2>/dev/null))
log " Verify 'node' is installed"
test ! "${node_installed}" == "${NODE_ARMv6_VERSION}" && exit_on_error "ERROR: 'node' not in expected version: '${node_installed}' instead of '${NODE_ARMv6_VERSION}'!"
test ! "${node_version_installed}" == "${NODE_ARMv6_VERSION}" && exit_on_error "ERROR: 'node' not in expected version: '${node_version_installed}' instead of '${NODE_ARMv6_VERSION}'!"
log " CHECK"
else
verify_apt_packages nodejs
Expand Down

0 comments on commit b952957

Please sign in to comment.