mirror of https://github.com/poanetwork/gecko.git
build: Fail loudly if bash variables are unset, or a pipeline errors
These bash options increase the robustness of bash scripts, increasing the chances that errors are spotted, instead of passing silently. errexit was already enabled (by bash -e) if the scripts were invoked as path/to/script.sh However bash -e would not take effect if the script was invoked as bash path/to/script.sh The long form of the options is used to serve as an memory aide for readers unfamiliar with bash options.
This commit is contained in:
parent
39cb2c1eb0
commit
fdff7839b3
|
@ -1,4 +1,8 @@
|
|||
#!/bin/bash -e
|
||||
#!/bin/bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
# Ted: contact me when you make any changes
|
||||
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
#!/bin/bash -e
|
||||
#!/bin/bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
SRC_DIR="$(dirname "${BASH_SOURCE[0]}")"
|
||||
export GOPATH="$SRC_DIR/.build_image_gopath"
|
||||
WORKPREFIX="$GOPATH/src/github.com/ava-labs/"
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#!/bin/bash -e
|
||||
#!/bin/bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
# Ted: contact me when you make any changes
|
||||
|
||||
|
|
Loading…
Reference in New Issue