Skip to content

ci: replace tac with awk to fix macOS runner compatibility - #575

Merged
hannesa2 merged 1 commit into
masterfrom
copilot/fix-tac-command-not-found
Aug 18, 2026
Merged

hannesa2 merged 1 commit into
masterfrom
copilot/fix-tac-command-not-found

Conversation

Copilot AI commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

tac is a GNU coreutils command not available on macOS runners, causing the Homebrew PR template step to fail with tac: command not found.

Change

Replaced the tac | sed | tac pattern (which marks the last unchecked checkbox in the PR template) with a portable awk one-liner that produces identical output:

# Before
TEMPLATE=$(echo "$TEMPLATE" | tac | sed '0,/- \[ \]/s/- \[ \]/- [x]/' | tac)

# After
TEMPLATE=$(echo "$TEMPLATE" | awk 'BEGIN{found=0} /- \[ \]/{lines[NR]=$0; found=NR; next} {lines[NR]=$0} END{for(i=1;i<=NR;i++){if(i==found){sub(/- \[ \]/,"- [x]",lines[i])}; print lines[i]}}')

awk buffers all lines, tracks the last matching line number, and substitutes only that occurrence on output — same semantics, no GNU dependency.

@hannesa2
hannesa2 marked this pull request as ready for review August 18, 2026 12:41
@hannesa2
hannesa2 merged commit ec8ffd8 into master Aug 18, 2026
2 checks passed
@hannesa2
hannesa2 deleted the copilot/fix-tac-command-not-found branch August 18, 2026 12:41
@hannesa2

Copy link
Copy Markdown
Contributor

Screenshot differs: emulatorApi=arm64 with 4 screenshot(s)

setpoint (old) | diff | actual screenshot (new)

00-commit-context-menu.pngscreenshot

01-history-view.pngscreenshot

02-main-window.pngscreenshot

03-staging-view.pngscreenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants