Skip to content

fix(install): cross-platform mktemp + 3 shellcheck warnings#6

Merged
ashbrener merged 1 commit into
mainfrom
fix/wingman-cross-platform-mktemp
Apr 28, 2026
Merged

fix(install): cross-platform mktemp + 3 shellcheck warnings#6
ashbrener merged 1 commit into
mainfrom
fix/wingman-cross-platform-mktemp

Conversation

@ashbrener

Copy link
Copy Markdown
Owner

Summary

  • Fix mktemp -t name calls in scripts/install.sh and assets/pre-push.sample — GNU mktemp rejects them (too few X's in template); switched to mktemp -t name.XXXXXX for BSD+GNU portability.
  • Clear 3 pre-existing shellcheck warnings in scripts/install.sh: SC2034 (unused END_MARKER), SC2126 (grep|wc -lgrep -c), SC2129 (grouped >> redirects with { ... } >> file).

How surfaced

PR #5's CI workflow caught these on first run.

Test plan

  • bash -n clean on both files
  • shellcheck --severity=error clean
  • shellcheck (default) clean (no SC2034/2126/2129)
  • Manual: install script still produces v2 hook on macOS
  • CI install-smoke job goes GREEN on this PR (run on Linux confirms cross-platform fix)

PR #5's install-smoke job (Linux runner) caught two `mktemp -t name`
invocations that fail on GNU mktemp (`too few X's in template`).
Linux/WSL contributors would have hit this immediately. Both fixed
to `mktemp -t name.XXXXXX` — portable across BSD (macOS) and GNU.

Also clears 3 pre-existing shellcheck warnings PR #5's lint job
surfaced in scripts/install.sh:
- SC2034: unused END_MARKER
- SC2126: grep|wc -l → grep -c
- SC2129: grouped redirects with { ... } >> file

No version bump (still wingman-hook-version: 2 — bugfixes within v2).
@ashbrener ashbrener marked this pull request as ready for review April 28, 2026 20:01
@ashbrener ashbrener merged commit dca3594 into main Apr 28, 2026
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.

1 participant