From 3bc1acba4a5e912e4731d4e09e7b194b3774117d Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 10 May 2023 11:32:00 -0700 Subject: [PATCH] install: Use set -x when installing node, shellcheck, shfmt, tx. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes it clearer which step failed if there’s an error. Signed-off-by: Anders Kaseorg --- scripts/lib/install-node | 1 + tools/setup/install-shellcheck | 1 + tools/setup/install-shfmt | 1 + tools/setup/install-transifex-cli | 1 + 4 files changed, 4 insertions(+) diff --git a/scripts/lib/install-node b/scripts/lib/install-node index 084fe2d105..3a8243b6bd 100755 --- a/scripts/lib/install-node +++ b/scripts/lib/install-node @@ -22,6 +22,7 @@ check_version() { } if ! check_version 2>/dev/null; then + set -x tmpdir="$(mktemp -d)" trap 'rm -r "$tmpdir"' EXIT cd "$tmpdir" diff --git a/tools/setup/install-shellcheck b/tools/setup/install-shellcheck index 1fec01d67c..2627ff8cfa 100755 --- a/tools/setup/install-shellcheck +++ b/tools/setup/install-shellcheck @@ -16,6 +16,7 @@ version: $version } if ! check_version 2>/dev/null; then + set -x tmpdir="$(mktemp -d)" trap 'rm -r "$tmpdir"' EXIT cd "$tmpdir" diff --git a/tools/setup/install-shfmt b/tools/setup/install-shfmt index e37d39c703..d7b238b8de 100755 --- a/tools/setup/install-shfmt +++ b/tools/setup/install-shfmt @@ -21,6 +21,7 @@ check_version() { } if ! check_version 2>/dev/null; then + set -x tmpdir="$(mktemp -d)" trap 'rm -r "$tmpdir"' EXIT cd "$tmpdir" diff --git a/tools/setup/install-transifex-cli b/tools/setup/install-transifex-cli index d8a7b0b9dd..8539243729 100755 --- a/tools/setup/install-transifex-cli +++ b/tools/setup/install-transifex-cli @@ -28,6 +28,7 @@ check_version() { } if ! check_version 2>/dev/null; then + set -x tmpdir="$(mktemp -d)" trap 'rm -r "$tmpdir"' EXIT cd "$tmpdir"