Skip to content

Fix "tac command not found" on macOS by using POSIX awk#327

Open
RoduanKD wants to merge 1 commit intobuildermethods:mainfrom
RoduanKD:patch-1
Open

Fix "tac command not found" on macOS by using POSIX awk#327
RoduanKD wants to merge 1 commit intobuildermethods:mainfrom
RoduanKD:patch-1

Conversation

@RoduanKD
Copy link

@RoduanKD RoduanKD commented Feb 6, 2026

Summary

Replace tac with POSIX awk in project-install.sh to fix "command not found" error on macOS.

Linked item

  • Closes: #

Checklist

  • Linked to related Issue/Discussion
  • Documented steps to test (below)
  • Drafted "how to use" docs (if this adds new behavior)
  • Backwards compatibility considered (notes if applicable)

Documented steps to test

  1. Run scripts/project-install.sh on macOS — verify no "tac: command not found" error
  2. Run scripts/project-install.sh on Linux — verify behavior is unchanged
  3. Use a profile with inheritance and confirm the chain displays in the correct (reversed) order

Notes for reviewers

tac is a GNU coreutils utility not available on macOS by default. The replacement awk '{a[NR]=$0} END{for(i=NR;i>=1;i--)print a[i]}' is POSIX-compliant and works on both macOS and Linux. No behavioral change — output is identical.

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