diff --git a/scripts/lib/install-node b/scripts/lib/install-node index e428e999c2..af8157a268 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 0e65c2038c..3aaeb374ea 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 3897f5a455..11af797932 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"