markchalloner / git-semver

Git plugin for Semantic Versioning
MIT License
382 stars 43 forks source link

Fix printf for OSX #18

Closed franciscocpg closed 8 years ago

franciscocpg commented 8 years ago

-printf does not exists for BSD find command so I was getting the following error when the folder .git-semver/plugins exists:

git semver next
find: -printf: unknown primary or operator

This PR fix this for OSX using -print and xargsremoving the remaining space.

markchalloner commented 8 years ago

Thanks very much for highlight of the issue. I think we can simplify and keep cross-OS compatibility by removing the case and using:

find "${plugin_dir}" -maxdepth 1 -type f -exec test -x "{}" \; -exec echo "${plugin_type},{}" \;

Do you agree?

franciscocpg commented 8 years ago

I agree and I updated the branch with your suggestion. 👍

markchalloner commented 8 years ago

Merged, thanks very much