Skip to content

Replace readlink with greadlink #61

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Replace readlink with greadlink #61

wants to merge 2 commits into from

Conversation

kare
Copy link
Contributor

@kare kare commented Apr 8, 2020

When working with Travis builds I sometimes have to run the build
locally to simulate what happens on Travis server.

This is difficult because macOS /usr/bin/readlink is different from
Linux's readlink.

One solution is to use greadlink which can be installed with brew install coreutils. Coreutils readlink is prefixed with a 'g' on macOS.

See the difference between implementations:

kkn@kare-mbp ~/src/github.com/streamr-dev/streamr-docker-dev master U % readlink streamr-docker-dev/bin.sh -f
kkn@kare-mbp ~/src/github.com/streamr-dev/streamr-docker-dev master U % greadlink streamr-docker-dev/bin.sh -f
/Users/kkn/src/github.com/streamr-dev/streamr-docker-dev/streamr-docker-dev/bin.sh

When working with Travis builds I sometimes have to run the build
locally to simulate what happens on Travis server.

This is difficult because macOS /usr/bin/readlink is different from
Linux's readlink.

One solution is to use greadlink which can be installed with 'brew
install coreutils'. Coreutils readlink is prefixed with a 'g' on macOS.

See the difference between implementations:
kkn@kare-mbp ~/src/github.com/streamr-dev/streamr-docker-dev master U % readlink streamr-docker-dev/bin.sh -f
kkn@kare-mbp ~/src/github.com/streamr-dev/streamr-docker-dev master U % greadlink streamr-docker-dev/bin.sh -f
/Users/kkn/src/github.com/streamr-dev/streamr-docker-dev/streamr-docker-dev/bin.sh
@kare kare marked this pull request as draft April 29, 2020 09:07
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.

1 participant