Skip to content

Commit

Permalink
chore(ci): add -o pipefail to default bash shell for Rust jobs an…
Browse files Browse the repository at this point in the history
…d fix CI job (#2421)

https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#defaultsrunshell

Setting default shell for Rust CI jobs to `bash -l -eo pipefail {0}`.
Without `pipefail` the exit code is the result of the last command (e.g.
`popd` as noted here
#2414 (comment)).
  • Loading branch information
mbrobbel authored Jan 7, 2025
1 parent 6729410 commit 7e792c9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ permissions:

defaults:
run:
shell: bash -l {0}
shell: bash -l -eo pipefail {0}

jobs:
rust:
Expand Down Expand Up @@ -83,8 +83,10 @@ jobs:
curl -L "https://github.com/protocolbuffers/protobuf/releases/download/v28.3/protoc-28.3-osx-universal_binary.zip" -o protoc.zip
unzip "protoc.zip" -d $HOME/.local
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Install sqlite3
if: runner.os == 'Linux'
run: sudo apt-get install libsqlite3-dev
- name: Build C++/Go drivers
shell: bash -l {0}
run: |
mkdir -p build
mkdir -p local
Expand Down

0 comments on commit 7e792c9

Please sign in to comment.