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

Improve Apple Silicon compatibility #606

Merged
merged 1 commit into from
Aug 30, 2021
Merged

Conversation

mafredri
Copy link
Collaborator

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.
@sindresorhus sindresorhus changed the title Try more paths during install, like /opt/homebrew on Mac M1 Improve Apple Silicon compatibility Aug 30, 2021
@sindresorhus sindresorhus merged commit c2e0cbe into main Aug 30, 2021
@sindresorhus sindresorhus deleted the fix-install-path-on-mac-m1 branch August 30, 2021 11:57
wezzynl added a commit to wezzynl/pure that referenced this pull request Sep 7, 2021
* upstream/main:
  Remove $ prompts from install commands (sindresorhus#607)
  1.17.2
  Improve Apple Silicon compatibility (sindresorhus#606)
  1.17.1
  Do not show hostname when running in GitHub Codespaces (sindresorhus#604)
  Fix version bumping script (sindresorhus#602)
  Add another sponsor to the readme
  1.17.0
  Add nix shell support (sindresorhus#599)
  Add Homebrew install instructions (sindresorhus#591)
  Update info about Fish port (sindresorhus#586)
  Remove antigen and antibody from instruction (sindresorhus#581)
  Update a link
kutsan pushed a commit to kutsan/pure that referenced this pull request Jun 19, 2023
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.

Cannot add pure to prompt themes, connected to MB M1?
2 participants