Skip to content

Fix macOS compatibility in tools/log.sh#741

Open
Kunal241207 wants to merge 2 commits intoprecice:developfrom
Kunal241207:fix-macos-log-sh
Open

Fix macOS compatibility in tools/log.sh#741
Kunal241207 wants to merge 2 commits intoprecice:developfrom
Kunal241207:fix-macos-log-sh

Conversation

@Kunal241207
Copy link

Summary

tools/log.sh used GNU-specific flags that are not available on macOS.

This change makes the script portable by:

  • Replacing date --rfc-email with a helper that falls back to a compatible date format when the flag is unavailable.
  • Replacing tee --append with the portable tee -a.

The behavior of the script remains the same, but it now works correctly on macOS systems.


Checklist:

  • I added a summary of any user-facing changes (compared to the last release) in the changelog-entries/<PRnumber>.md.
  • I will remember to squash-and-merge, providing a useful summary of the changes of this PR.

@PranjalManhgaye
Copy link
Contributor

PranjalManhgaye commented Mar 6, 2026

@Kunal241207 nice fix. two quick questions: (1) Was using date -u in the fallback intentional? on linux we get local time, so i was wondering if we’d want the same on macOS , (may be removing that -u) (2) One “Started on:” has two spaces after the colon and the other has one—was that on purpose? Just curious. thanks

@Kunal241207
Copy link
Author

Kunal241207 commented Mar 6, 2026

@PranjalManhgaye Good catch, thanks!

  1. The -u wasn’t intentional. You're right that date --rfc-email uses local time, so removing -u makes the fallback match the original behavior better.
  2. The spacing difference wasn’t intentional either. I’ll normalize it to a single space.

I've pushed the update.

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