more set -o errexit (#10468)

* more set -o errexit -o pipefail

* no pipefail, too fancy for dash at least...
This commit is contained in:
Kyle Altendorf 2022-03-17 12:13:27 -04:00 committed by GitHub
parent 144c4d1478
commit 161a838b6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 22 additions and 5 deletions

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -o errexit
if [ ! "$1" ]; then if [ ! "$1" ]; then
echo "This script requires either amd64 of arm64 as an argument" echo "This script requires either amd64 of arm64 as an argument"
exit 1 exit 1

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -o errexit
if [ ! "$1" ]; then if [ ! "$1" ]; then
echo "This script requires either amd64 of arm64 as an argument" echo "This script requires either amd64 of arm64 as an argument"
exit 1 exit 1

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -euo pipefail set -o errexit -o nounset
pip install setuptools_scm pip install setuptools_scm
# The environment variable CHIA_INSTALLER_VERSION needs to be defined. # The environment variable CHIA_INSTALLER_VERSION needs to be defined.

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -euo pipefail set -o errexit -o nounset
pip install setuptools_scm pip install setuptools_scm
# The environment variable CHIA_INSTALLER_VERSION needs to be defined. # The environment variable CHIA_INSTALLER_VERSION needs to be defined.

View File

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
# Cleans up files/directories that may be left over from previous runs for a clean slate before starting a new build # Cleans up files/directories that may be left over from previous runs for a clean slate before starting a new build
set -o errexit
PWD=$(pwd) PWD=$(pwd)
rm -rf ../venv || true rm -rf ../venv || true

View File

@ -2,6 +2,8 @@
# This hack is a quick way to recompile everything in this directory # This hack is a quick way to recompile everything in this directory
set -o errexit
#BASE_DIR=`pwd | dirname` #BASE_DIR=`pwd | dirname`
FILES=$(ls ./*.clvm) FILES=$(ls ./*.clvm)

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -e
set -o errexit
export NODE_OPTIONS="--max-old-space-size=3000" export NODE_OPTIONS="--max-old-space-size=3000"
SCRIPT_DIR=$(cd -- "$(dirname -- "$0")"; pwd) SCRIPT_DIR=$(cd -- "$(dirname -- "$0")"; pwd)

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -o errexit
if [ -z "$VIRTUAL_ENV" ]; then if [ -z "$VIRTUAL_ENV" ]; then
echo "This requires the chia python virtual environment." echo "This requires the chia python virtual environment."
echo "Execute '. ./activate' before running." echo "Execute '. ./activate' before running."

View File

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
set -e
set -o errexit
USAGE_TEXT="\ USAGE_TEXT="\
Usage: $0 [-d] Usage: $0 [-d]

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -o errexit
python3 -m venv venv python3 -m venv venv
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. ./activate . ./activate

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -e
set -o errexit
export NODE_OPTIONS="--max-old-space-size=3000" export NODE_OPTIONS="--max-old-space-size=3000"
SCRIPT_DIR=$(cd -- "$(dirname -- "$0")"; pwd) SCRIPT_DIR=$(cd -- "$(dirname -- "$0")"; pwd)