Skip to content

Comments

less gnu-y alternative to find -printf#335

Merged
wilzbach merged 1 commit intodlang:masterfrom
John-Colvin:master
Jul 31, 2018
Merged

less gnu-y alternative to find -printf#335
wilzbach merged 1 commit intodlang:masterfrom
John-Colvin:master

Conversation

@John-Colvin
Copy link
Contributor

because not everywhere has gnu tools (e.g. macOS)

@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @John-Colvin! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the annotated coverage diff directly on GitHub with CodeCov's browser extension
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

@John-Colvin
Copy link
Contributor Author

I would have expected this to be caught already by travis as well.

@wilzbach
Copy link
Contributor

I would have expected this to be caught already by travis as well.

Same here. Though considering that this script is used by Travis for their builtin D support, I'm partially glad it did work.
I couldn't see anything in the logs of the master branch:

https://travis-ci.org/dlang/installer/jobs/399790376

Any idea why it's working fine on Travis OSX?

@wilzbach wilzbach merged commit 2646611 into dlang:master Jul 31, 2018
@wilzbach
Copy link
Contributor

(FYI: Deployed this and the other PR)

@John-Colvin
Copy link
Contributor Author

John-Colvin commented Jul 31, 2018

Maybe they have the GNU tools by default? They are in homebrew as coreutils but have g prefixes (e.g. gsed, gfind).

From brew info coreutils:

All commands have been installed with the prefix 'g'.

If you really need to use these commands with their normal names, you
can add a "gnubin" directory to your PATH from your bashrc like:

    PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"

Additionally, you can access their man pages with normal names if you add
the "gnuman" directory to your MANPATH from your bashrc as well:

    MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"

@wilzbach
Copy link
Contributor

It's not mentioned here: https://docs.travis-ci.com/user/reference/osx, but yeah apparently newer brew versions even have a special flag for this (https://apple.stackexchange.com/questions/69223/how-to-replace-mac-os-x-utilities-with-gnu-core-utilities). Maybe that's what they do on Travis.

Maybe they have the GNU tools by default?

Any idea how we could reverse this?

@John-Colvin
Copy link
Contributor Author

John-Colvin commented Jul 31, 2018

I made mistake above, find is actually in findutils. findutils does have --with-default-names.

We can do brew uninstall --force findutils <etc> before testing.

@wilzbach
Copy link
Contributor

cool, let's see what happens :O
#337

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.

3 participants