On M1 Macs, the Homebrew path has changed to /opt/homebrew so we check at which path zsh is present.
Additionally we try to install into standard unix path if present, however, this will likely only help people installing via sudo.
Finally, the error text has been updated to prioritize updating .zshrc instead of doing a manual install.
Fixes #584.
Example output of updated error text (where /usr/local/bin/zsh and /opt/homebrew/bin/zsh is not present):
❯ npm run --silent postinstall
ln: /usr/share/zsh/site-functions/prompt_pure_setup: Operation not permitted
ERROR: Could not automagically symlink the prompt. You can either:
1. Add the following to your `.zshrc`:
fpath+=('/Users/maf/Code/pure/functions')
2. Or check out the readme on how to do it manually: https://github.com/sindresorhus/pure#manually
On M1 Macs, the Homebrew path has changed to
/opt/homebrew
so we check at which path zsh is present.Additionally we try to install into standard unix path if present, however, this will likely only help people installing via
sudo
.Finally, the error text has been updated to prioritize updating
.zshrc
instead of doing a manual install.Fixes #584.
Example output of updated error text (where
/usr/local/bin/zsh
and/opt/homebrew/bin/zsh
is not present):