fix: match typeset in readonly guard for zsh compatibility#115
Conversation
In zsh, readonly variables are reported with 'typeset' instead of 'declare', causing the re-sourcing guard to miss the variable and attempt to redeclare it, triggering 'read-only variable' errors. Closes GingerGraham#112
|
@Jah-yee thank you for running with this. Any chance that you could clean up the PR comments though to remove all the OpenClaw inserted text and better describe the submitted change? Not that I'm against using AI tooling as you can tell from my own code, but I am pro- human readable transparency and so I'd prefer PRs to be readable as to the issue it's addressing, the fix/changes and testing to validate. I've mocked up the solution myself as I was opening the issue so I'm confident it's good, but having a second set of test eyes on it from the contributor would be preferrable. Thanks again! |
|
Tests and styling all good, locally testing shows OK too. Just need to clean up the PR itself and then this one is good to go |
GingerGraham
left a comment
There was a problem hiding this comment.
Change in line with what I was expecting
|
Done! PR description has been cleaned up — removed all the tooling noise and kept just the clean Problem/Fix/Testing format. Thanks for the feedback, noted for future PRs. |
|
🎉 This PR is included in version 2.5.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Problem
When sourcing bash-logger from
.zshrc, the re-sourcing guard on line 57 fails becausereadonly -pin zsh outputstypesetinstead ofdeclare. This causes:Fix
Extend the grep pattern to match both
declareandtypeset:Testing
Reported and confirmed by the original issue author (issue #112).
Closes #112