-
Notifications
You must be signed in to change notification settings - Fork 135
Make test-php-watch
cross-platform compatible via fswatch
#2110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this 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!
bin/test-php-watch.sh
Outdated
exit 1 | ||
|
||
# Check for the fswatch command | ||
if ! which fswatch >/dev/null 2>&1; then |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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>
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 thatinotify-tools
is only for Linux. Therefore, this PR switches out theinotifywait
command for thefswatch
command which is cross-platform.