E51C Use `whence -p` instead of `which` for Zsh by jarodhayes · Pull Request #1363 · phpbrew/phpbrew · GitHub
[go: up one dir, main page]

Skip to content

Use whence -p instead of which for Zsh#1363

Closed
jarodhayes wants to merge 1 commit intophpbrew:masterfrom
jarodhayes:master
Closed

Use whence -p instead of which for Zsh#1363
jarodhayes wants to merge 1 commit intophpbrew:masterfrom
jarodhayes:master

Conversation

@jarodhayes
Copy link
@jarodhayes jarodhayes commented Feb 13, 2024

This is to address a regression to an issue outlined in #1140, and addressed with PR #1142. The fix to the issue was removed in commit 729420d.

To my understanding, which incorrectly resolves to the phpbrew shell function instead of the binary when using Zsh. Instead, whence -p should be used to resolve the binary.

@jarodhayes jarodhayes changed the title Switched to using whence -p instead of which for Zsh Use whence -p instead of which for Zsh Feb 13, 2024
@jarodhayes
Copy link
Author

Hello,

I did some additional troubleshooting and found that the issue was primarily that PHPBrew's bashrc was for some reason being sourced through zsh's emulation mode, specifically ksh emulation. While the pull request did fix the issue in that use case, it's probably best to just source the file directly as designed.

@jarodhayes jarodhayes closed this Feb 24, 2024
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

Comments

0