Skip to content
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

Fix printf for OSX #18

Merged
merged 2 commits into from
Aug 25, 2016
Merged

Conversation

franciscocpg
Copy link
Contributor

-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
Copy link
Owner

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},{}" \;
  • Remove redundant execute permission check (handled by test)
  • Remove call to bash and exec run test directly
  • Exec echo to output prefix

Do you agree?

@franciscocpg
Copy link
Contributor Author

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

@markchalloner markchalloner merged commit 2d2057d into markchalloner:master Aug 25, 2016
@markchalloner
Copy link
Owner

Merged, thanks very much

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