Skip to content

Commit

Permalink
Explicitly set -e in $(...) commands
Browse files Browse the repository at this point in the history
Using the added `.shellcheckrc` options of PR quantumlib#7079, the `shellcheck`
program flagged a couple of places where the effects of the `set -e`
at the beginning of this script would not have the expected effect.
  • Loading branch information
mhucka committed Feb 23, 2025
1 parent a2bf6e8 commit 708fe24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dev_tools/packaging/produce-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ echo "Creating pristine repository clone at ${tmp_git_dir}"
git clone --shared --quiet "${repo_dir}" "${tmp_git_dir}"
cd "${tmp_git_dir}"
if [ -n "${SPECIFIED_VERSION}" ]; then
CURRENT_VERSION=$(my_dev_tools_modules print_version)
CURRENT_VERSION=$(set -e; my_dev_tools_modules print_version)
my_dev_tools_modules replace_version --old="${CURRENT_VERSION}" --new="${SPECIFIED_VERSION}"
fi

# Python 3 wheel.
echo "Producing python 3 package files."

CIRQ_MODULES=$(my_dev_tools_modules list --mode folder --include-parent)
CIRQ_MODULES=$(set -e; my_dev_tools_modules list --mode folder --include-parent)

for m in $CIRQ_MODULES; do
echo "processing $m/setup.py..."
Expand Down

0 comments on commit 708fe24

Please sign in to comment.