From a52bf46031640792c9105f35af6534d58b10b6a6 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Sun, 1 Jun 2025 23:32:29 +0200 Subject: [PATCH] treewide: streamline bash error reporting - Show the script file name - Use common line number format that allows opening file at line in editors --- helper/fetch-release | 2 +- test/ci/build-to-cachix.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helper/fetch-release b/helper/fetch-release index 2066b3b..7b447a0 100755 --- a/helper/fetch-release +++ b/helper/fetch-release @@ -4,7 +4,7 @@ set -euo pipefail scriptDir=$(cd "${BASH_SOURCE[0]%/*}" && pwd) -trap 'echo "Error at ${BASH_SOURCE[0]}, line $LINENO"' ERR +trap 'echo "Error at ${BASH_SOURCE[0]}:$LINENO"' ERR repo=fort-nix/nix-bitcoin if [[ ! -v version ]]; then diff --git a/test/ci/build-to-cachix.sh b/test/ci/build-to-cachix.sh index 88bfe6e..689fd56 100755 --- a/test/ci/build-to-cachix.sh +++ b/test/ci/build-to-cachix.sh @@ -9,7 +9,7 @@ set -euo pipefail CACHIX_SIGNING_KEY="${CACHIX_SIGNING_KEY:-}" cachixCache=nix-bitcoin -trap 'echo Error at line $LINENO' ERR +trap 'echo "Error at ${BASH_SOURCE[0]}:$LINENO"' ERR tmpDir=$(mktemp -d -p /tmp) trap 'rm -rf $tmpDir' EXIT