Skip to content

Commit

Permalink
Use set -x for shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
stepchowfun committed Mar 13, 2024
1 parent bba67a1 commit 5f959d9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
write_remote_cache: ${{ github.event_name == 'push' }}
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
set -euxo pipefail
# The artifact name will contain the target triple, so the file name doesn't need to.
mv artifacts/docuum-x86_64-unknown-linux-gnu artifacts/docuum
Expand All @@ -37,7 +37,7 @@ jobs:
if-no-files-found: error
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
set -euxo pipefail
# The artifact name will contain the target triple, so the file name doesn't need to.
mv artifacts/docuum-x86_64-unknown-linux-musl artifacts/docuum
Expand All @@ -48,7 +48,7 @@ jobs:
if-no-files-found: error
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
set -euxo pipefail
# The artifact name will contain the target triple, so the file name doesn't need to.
mv artifacts/docuum-aarch64-unknown-linux-gnu artifacts/docuum
Expand All @@ -59,7 +59,7 @@ jobs:
if-no-files-found: error
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
set -euxo pipefail
# The artifact name will contain the target triple, so the file name doesn't need to.
mv artifacts/docuum-aarch64-unknown-linux-musl artifacts/docuum
Expand All @@ -74,15 +74,15 @@ jobs:
steps:
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
set -euxo pipefail
# The unit tests do not expect the files in `test_data` to have carriage returns added.
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v3
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
set -euxo pipefail
# Install the appropriate version of Rust.
rustup toolchain install 1.76.0 # [ref:rust_1.76.0]
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
- uses: actions/checkout@v3
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
set -euxo pipefail
# Install the appropriate version of Rust.
rustup toolchain install 1.76.0 # [ref:rust_1.76.0]
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
- uses: actions/checkout@v3
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
set -euxo pipefail
# Run the installer script.
PREFIX=/tmp ./install.sh
Expand All @@ -174,7 +174,7 @@ jobs:
- uses: actions/checkout@v3
- run: |
# Make Bash not silently ignore errors.
set -euo pipefail
set -euxo pipefail
# Run the installer script.
PREFIX=/tmp ./install.sh
Expand All @@ -201,7 +201,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Make Bash not silently ignore errors.
set -euo pipefail
set -euxo pipefail
# Install the appropriate version of Rust.
rustup toolchain install 1.76.0 # [ref:rust_1.76.0]
Expand Down Expand Up @@ -259,7 +259,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Make Bash not silently ignore errors.
set -euo pipefail
set -euxo pipefail
# Run the Docker image to validate it. The image has already been published (since the
# `docker/build-push-action@v5` action unfortunately doesn't support importing multi-
Expand Down
2 changes: 1 addition & 1 deletion integration-test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -euo pipefail
set -euxo pipefail

# See [ref:integration_test_step] for how to run this integration test.

Expand Down
2 changes: 1 addition & 1 deletion toast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default: build
user: user
command_prefix: |
# Make Bash not silently ignore errors.
set -euo pipefail
set -euxo pipefail
# Load the Rust startup file, if it exists.
if [ -f "$HOME/.cargo/env" ]; then
Expand Down

0 comments on commit 5f959d9

Please sign in to comment.