Skip to content

Commit

Permalink
more set -o errexit (#10468)
Browse files Browse the repository at this point in the history
* more set -o errexit -o pipefail

* no pipefail, too fancy for dash at least...
  • Loading branch information
altendky authored Mar 17, 2022
1 parent 144c4d1 commit 161a838
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 5 deletions.
2 changes: 2 additions & 0 deletions build_scripts/build_linux_deb.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -o errexit

if [ ! "$1" ]; then
echo "This script requires either amd64 of arm64 as an argument"
exit 1
Expand Down
2 changes: 2 additions & 0 deletions build_scripts/build_linux_rpm.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -o errexit

if [ ! "$1" ]; then
echo "This script requires either amd64 of arm64 as an argument"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build_scripts/build_macos.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -euo pipefail
set -o errexit -o nounset

pip install setuptools_scm
# The environment variable CHIA_INSTALLER_VERSION needs to be defined.
Expand Down
2 changes: 1 addition & 1 deletion build_scripts/build_macos_m1.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

set -euo pipefail
set -o errexit -o nounset

pip install setuptools_scm
# The environment variable CHIA_INSTALLER_VERSION needs to be defined.
Expand Down
2 changes: 2 additions & 0 deletions build_scripts/clean-runner.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# 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)

rm -rf ../venv || true
Expand Down
2 changes: 2 additions & 0 deletions chia/wallet/puzzles/recompile-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# This hack is a quick way to recompile everything in this directory

set -o errexit

#BASE_DIR=`pwd | dirname`

FILES=$(ls ./*.clvm)
Expand Down
4 changes: 3 additions & 1 deletion install-gui.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash
set -e

set -o errexit

export NODE_OPTIONS="--max-old-space-size=3000"

SCRIPT_DIR=$(cd -- "$(dirname -- "$0")"; pwd)
Expand Down
2 changes: 2 additions & 0 deletions install-timelord.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -o errexit

if [ -z "$VIRTUAL_ENV" ]; then
echo "This requires the chia python virtual environment."
echo "Execute '. ./activate' before running."
Expand Down
3 changes: 2 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e

set -o errexit

USAGE_TEXT="\
Usage: $0 [-d]
Expand Down
2 changes: 2 additions & 0 deletions run-py-tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -o errexit

python3 -m venv venv
# shellcheck disable=SC1091
. ./activate
Expand Down
4 changes: 3 additions & 1 deletion start-gui.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash
set -e

set -o errexit

export NODE_OPTIONS="--max-old-space-size=3000"

SCRIPT_DIR=$(cd -- "$(dirname -- "$0")"; pwd)
Expand Down

0 comments on commit 161a838

Please sign in to comment.