Skip to content

Commit dfdd257

Browse files
committed
refactor: update bash scripts errors handling
1 parent bccd07b commit dfdd257

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

resources/deb/build.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env bash
22

3+
set -Eeuo pipefail
4+
trap 'echo -e "⚠ Error ($0:$LINENO): $(sed -n "${LINENO}p" "$0" 2> /dev/null | grep -oE "\S.*\S|\S" || true)" >&2; return 3 2> /dev/null || exit 3' ERR
5+
36
ROOT=$(pwd)
47
DISTS=$ROOT/dists
58

@@ -60,8 +63,6 @@ function _build_local() {
6063
}
6164

6265
function _build() { (
63-
set -e
64-
6566
build
6667
); }
6768

0 commit comments

Comments
 (0)