Skip to content

build: harden build-pr.ps1 gitleaks install (macOS arch + tar-from-stdin) - #269

Merged
Chris-Wolfgang merged 1 commit into
mainfrom
maint/build-pr-gitleaks-portability
Jul 18, 2026
Merged

build: harden build-pr.ps1 gitleaks install (macOS arch + tar-from-stdin)#269
Chris-Wolfgang merged 1 commit into
mainfrom
maint/build-pr-gitleaks-portability

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

Fleet-sync of two portability improvements into this repo's local pr.yaml mirror (scripts/build-pr.ps1), found during an audit of the ETL repos' local gates:

  • macOS darwin/arm64 branch — the non-Windows gitleaks install always downloaded the Linux tarball, which fails / installs an incompatible binary on macOS (esp. Apple Silicon).
  • tar -xz -f - — read the archive from stdin explicitly; GNU tar without -f defaults to /dev/tape and can hang silently in CI / fresh shells.

Brings this repo's build-pr.ps1 in line with canonical (ETL-FixedWidth #214 / repo-template #432). Dev-tooling script only — not compiled or exercised by pr.yaml's build/test/coverage gate, so no build/test surface. PowerShell hand-verified.

…din)

Fleet-sync of two portability improvements into the local pr.yaml mirror:

- macOS darwin/arm64 branch: the non-Windows gitleaks path previously
  always downloaded the Linux tarball, which fails or installs an
  incompatible binary on macOS (esp. Apple Silicon).
- `tar -xz -f -`: read the archive from stdin explicitly; GNU tar without
  `-f` defaults to /dev/tape and can hang silently in CI / fresh shells.

Dev-tooling script only — not part of the build/test/coverage gate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 14, 2026 02:12

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.

Pull request overview

Updates the local PR gate script (scripts/build-pr.ps1) to make the on-demand gitleaks install portable and reliable across macOS (including Apple Silicon) and GNU tar environments, aligning with the upstream ETL template behavior.

Changes:

  • Select the correct gitleaks release artifact on macOS (darwin_arm64 vs darwin_x64) instead of always downloading the Linux tarball.
  • Make tar extraction explicitly read from stdin via tar ... -f - to avoid GNU tar defaulting to /dev/tape and potentially hanging.

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