Skip to content

Feed grep -q from here-strings in workflow scripts - #1073

Merged
dhh merged 1 commit into
mainfrom
shellcheck-sc2337
Dec 5, 2026
Merged

dhh merged 1 commit into
mainfrom
shellcheck-sc2337

Conversation

@dhh

@dhh dhh commented Dec 5, 2026

Copy link
Copy Markdown
Member

The GitHub Actions audit job fails on main, and so on every PR (e.g. #1072), because the runner's newer shellcheck added SC2337. Under pipefail, grep -q at the end of a pipeline exits on its first match, and the command writing into it can then die of SIGPIPE, which fails the step on a match.

The five flagged spots (one in release.yml, four in test.yml) now feed grep with <<< instead of a pipe. Here-strings work under the Bash 3.2 that the installer steps run on.

bin/ci passes locally. The shellcheck pinned locally (0.11.0) may not have SC2337 yet, so this PR's audit job is what confirms it.

🤖 Generated with Claude Code

A newer shellcheck (SC2337) flags grep -q at the end of a pipeline under
pipefail: grep exits on its first match, and the writer can then die of
SIGPIPE, failing the step on a match. The GitHub Actions audit job fails
on main with it. Here-strings give grep its input without a pipe, and
work under the Bash 3.2 those installer steps run on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dhh
dhh requested a review from a team as a code owner December 5, 2026 07:54
Copilot AI adaptive review requested due to automatic review settings December 5, 2026 07:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approved

The review identifies no active issues in the workflow updates addressing SIGPIPE-prone checks while preserving Bash 3.2 compatibility.

No open issues 🎉

What changed in this PR

Updates GitHub Actions workflow checks to avoid pipefail/grep -q SIGPIPE failures while preserving Bash 3.2 compatibility.

Changes:

  • Replaced affected pipelines with Bash here-strings.
  • Updated installer and hardened-runtime validation checks.
File Description
.github/​workflows/​test.yml Updates four installer-output assertions to use Bash here-strings instead of grep -q pipelines.
.github/​workflows/​release.yml Updates the hardened-runtime check to use a Bash here-string instead of a grep -q pipeline.

Review effort: Lite (adaptive)

@dhh
dhh enabled auto-merge (squash) December 5, 2026 07:58
@dhh
dhh merged commit 62737d6 into main Dec 5, 2026
31 checks passed
@dhh
dhh deleted the shellcheck-sc2337 branch December 5, 2026 08:01
jeremy added a commit that referenced this pull request Dec 5, 2026
…950575

* origin/main:
  Put the Omarchy Basecamp plugin in the tray on setup (#1074)
  Feed grep -q from here-strings in workflow scripts (#1073)
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