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: use which instead of type to check for realpath #78

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

josephschmitt
Copy link

For whatever reason, type -p realpath returns empty on macOS even though realpath exists, and so it defaults to using readlink -f which does not work on macOS.

Using which realpath seems to work better.

@juanibiapina
Copy link
Member

it works fine for me:

❯ type -p realpath
realpath is /usr/local/bin/realpath

Can you debug why this is happening? I'd rather not include a fix unless we can find the root cause.

@josephschmitt
Copy link
Author

it works fine for me:

❯ type -p realpath
realpath is /usr/local/bin/realpath

Can you debug why this is happening? I'd rather not include a fix unless we can find the root cause.

I'm not sure how much more I can do to debug:
image

You tried this on macOS? I'm on Big Sur. Maybe you were in a different OS version?

@juanibiapina
Copy link
Member

juanibiapina commented May 20, 2021

Why do you say realpath exists? It very likely comes from brew coreutils. Did you try running which realpath ?

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