Skip to content

ci: run every workflow step under bash -euo pipefail - #33

Merged
nozaq merged 1 commit into
mainfrom
claude/elegant-lovelace-ogl1j9
Sep 10, 2026
Merged

nozaq merged 1 commit into
mainfrom
claude/elegant-lovelace-ogl1j9

Conversation

@nozaq

@nozaq nozaq commented Sep 10, 2026

Copy link
Copy Markdown
Member

Summary

Every workflow now sets its shell once:

defaults:
  run:
    shell: bash -euo pipefail {0}

The runner's default for run steps is bash -e {0}, so -e was already in effect everywhere; what this adds is -u (an unset variable is an error instead of an empty string) and -o pipefail (a command failing anywhere in a pipeline fails the step, not just the last one).

The five per-step set -euo pipefail lines are now covered by the workflow-level shell and are removed:

  • ci.yml: List features under src/, Assemble the test workspace
  • release.yml: Create PR for Documentation
  • update-material.yml: Refresh trusted material, Create PR for refreshed material

The steps that had no set line gain the options: the CLI install, devcontainer up, and the smoke_test.sh invocation. Each reads only variables defined in its own env.

Impact review

Each run block was checked for an unset variable reference and for a pipeline whose non-final command is allowed to fail; none exists here. The scripts that do not need a Dev Container were executed under bash -euo pipefail: feature discovery and Assemble the test workspace.

scripts/update-material.sh is run as bash scripts/update-material.sh, a fresh shell, so its own options are unchanged by this.

🤖 Generated with Claude Code

https://claude.ai/code/session_0146WGNYA5chgKdzwn1ZGLw3


Generated by Claude Code

The runner's default shell is "bash -e {0}", so an unset variable expanded
to an empty string and a command that failed mid-pipeline went unnoticed.
Set the shell once per workflow via defaults.run instead, and drop the
per-step "set -euo pipefail" lines it supersedes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0146WGNYA5chgKdzwn1ZGLw3
@nozaq
nozaq marked this pull request as ready for review September 10, 2026 22:40
@nozaq
nozaq merged commit a134228 into main Sep 10, 2026
9 checks passed
@nozaq
nozaq deleted the claude/elegant-lovelace-ogl1j9 branch September 10, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants