Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

fix node-gyp dependency check and prevent early exit during checking node-gyp installed (bash -e) #1355

Merged
merged 12 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
build/
dist/
third_party/quic-lib
third_party/node-v*
third_party/usrsctp/
third_party/licode/
third_party/openh264
third_party/nICEr
third_party/re
third_party/webrtc
third_party/webrtc-*
third_party/SVT-HEVC
node_modules/
*.o
Expand Down
9 changes: 5 additions & 4 deletions scripts/installCommonDeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -519,18 +519,19 @@ install_node() {
}

install_node_tools() {
local installed=0
if [ "$CHECK_INSTALL" = true ]; then
npm list -g node-gyp > /dev/null 2>&1
if [ $? -eq 0 ]; then
npm list -g node-gyp@6.1.0 > /dev/null 2>&1 || installed=1
if [ $installed -eq 0 ]; then
echo "node_tools - Yes"
else
echo "node_tools - No"
fi
return 0
fi
if [ "${INCR_INSTALL}" == "true" ]; then
npm list -g node-gyp > /dev/null 2>&1
[ $? -eq 0 ] && echo "node tools already installed." && return 0
npm list -g node-gyp@6.1.0 > /dev/null 2>&1 || installed=1
[ $installed -eq 0 ] && echo "node tools already installed." && return 0
fi

check_proxy
Expand Down
Loading