Skip to content

Conversation

westonruter
Copy link
Member

I first developed the test-php-watch command (#1401) when I was using Linux for my development environment. Since switching (back) to Mac, I discovered that inotify-tools is only for Linux. Therefore, this PR switches out the inotifywait command for the fswatch command which is cross-platform.

@westonruter westonruter added no milestone PRs that do not have a defined milestone for release skip changelog PRs that should not be mentioned in changelogs labels Aug 3, 2025
Copy link

github-actions bot commented Aug 3, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: westonruter <westonruter@git.wordpress.org>
Co-authored-by: ShyamGadde <shyamgadde@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@westonruter westonruter added the [Type] Enhancement A suggestion for improvement of an existing feature label Aug 4, 2025
@westonruter westonruter requested a review from ShyamGadde August 4, 2025 04:35
Copy link
Contributor

@ShyamGadde ShyamGadde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀 Nice improvement for cross-platform compatibility!

exit 1

# Check for the fswatch command
if ! which fswatch >/dev/null 2>&1; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a tiny optional suggestion: I feel command -v might be a bit more portable across POSIX systems and tends to behave more consistently between GNU and BSD variants than which. Not a blocker at all, just tossing it out there in case it's helpful.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Could you amend the PR with that suggestion?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in bae238d.

Co-authored-by: Weston Ruter <weston@ruter.net>
Signed-off-by: Shyamsundar Gadde <shyamsundar.gadde@rtcamp.com>
@westonruter westonruter merged commit b837d81 into trunk Aug 4, 2025
6 checks passed
@westonruter westonruter deleted the add/test-php-watch-cross-platform-compat branch August 4, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no milestone PRs that do not have a defined milestone for release skip changelog PRs that should not be mentioned in changelogs [Type] Enhancement A suggestion for improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants