Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

install-node: Silence expected “node: command not found” on first run.

Anders Kaseorg702185262770
diff --git a/scripts/lib/install-node b/scripts/lib/install-node
index e428e999c2b..af8157a2685 100755
--- a/scripts/lib/install-node
+++ b/scripts/lib/install-node
@@ -20,7 +20,7 @@ check_version() {
out="$(node --version)" && [ "$out" = "v$version" ]
}
-if ! check_version; then
+if ! check_version 2>/dev/null; then
tmpdir="$(mktemp -d)"
trap 'rm -r "$tmpdir"' EXIT
cd "$tmpdir"
diff --git a/tools/setup/install-shellcheck b/tools/setup/install-shellcheck
index 0e65c2038c9..3aaeb374eaa 100755
--- a/tools/setup/install-shellcheck
+++ b/tools/setup/install-shellcheck
@@ -10,12 +10,12 @@ declare -A sha256=(
)
check_version() {
- out="$(shellcheck --version 2>/dev/null)" && [[ "$out" = *"
+ out="$(shellcheck --version)" && [[ "$out" = *"
version: $version
"* ]]
}
-if ! check_version; then
+if ! check_version 2>/dev/null; then
tmpdir="$(mktemp -d)"
trap 'rm -r "$tmpdir"' EXIT
cd "$tmpdir"
diff --git a/tools/setup/install-shfmt b/tools/setup/install-shfmt
index 3897f5a4552..11af7979323 100755
--- a/tools/setup/install-shfmt
+++ b/tools/setup/install-shfmt
@@ -17,10 +17,10 @@ case $arch in
esac
check_version() {
- out="$(shfmt --version 2>/dev/null)" && [ "$out" = "v$version" ]
+ out="$(shfmt --version)" && [ "$out" = "v$version" ]
}
-if ! check_version; then
+if ! check_version 2>/dev/null; then
tmpdir="$(mktemp -d)"
trap 'rm -r "$tmpdir"' EXIT
cd "$tmpdir"