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

feat(postgres): support Homebrew for Apple Silicon #10618

Merged
merged 2 commits into from
Jan 24, 2022

Conversation

carlosala
Copy link
Member

Standards checklist:

  • The PR title is descriptive.
  • The PR doesn't replicate another PR which is already open.
  • I have read the contribution guide and followed all the instructions.
  • The code follows the code style guide detailed in the wiki.
  • The code is mine or it's from somewhere with an MIT-compatible license.
  • The code is efficient, to the best of my ability, and does not waste computer resources.
  • The code is stable and I have tested it myself, to the best of my abilities.

Changes:

Supporting apple silicon devices for postgres plugin.
Closes #10612

@ohmyzsh ohmyzsh bot added Area: plugin Issue or PR related to a plugin Topic: alias Pull Request or issue regarding aliases labels Jan 24, 2022
@naxels
Copy link

naxels commented Jan 24, 2022

Same as posted in issue:

1 suggestion I would make is to use brew --prefix to determine the install folder/postgres location, this returns for me:

  • on Apple Silicon: /opt/homebrew
  • on Intel: /usr/local

and then append /var/postgres

That way in the future if ever things change again, the plugin will likely keep working if the defaults change along.

Sample:
alias startpost="pg_ctl -D $(brew --prefix)/var/postgres -l $(brew --prefix)/var/postgres/server.log start"

@carlosala
Copy link
Member Author

thanks @naxels!

@naxels
Copy link

naxels commented Jan 24, 2022

Thanks @carlosala, tried your change on Apple Silicon & Intel, works like a charm for both :)

@mcornella mcornella changed the title feat(postgres): support apple silicon feat(postgres): support Homebrew for Apple Silicon Jan 24, 2022
@mcornella mcornella merged commit 4417faf into ohmyzsh:master Jan 24, 2022
@carlosala carlosala deleted the postgresql branch January 24, 2022 16:46
lesterchan added a commit to lesterchan/oh-my-zsh that referenced this pull request Feb 5, 2022
* upstream/master: (41 commits)
  Introducing the ANSI logo graphic
  feat(yarn): add setting to disable adding global dir to `$PATH` (ohmyzsh#10642)
  fix(cli): allow `omz` commands to be used in a script (ohmyzsh#10645)
  feat(multipass): add plugin for multipass (ohmyzsh#10140)
  refactor(zsh_reload)!: remove deprecated plugin
  chore: update copyright year
  refactor(django): remove deprecated `django` plugin
  style(init): use consistent code style in init script (ohmyzsh#10601)
  refactor(installer): use POSIX-standard's `id -u -n` to define `$USER`
  chore(1password): fix comments to follow code (ohmyzsh#10634)
  fix(gitfast): update to git-completion 1.3.6 (ohmyzsh#10633)
  fix(changelog): don't show changelog with only ignored type commits
  style(rkj-repos): change `white` to `default` to support light color schemes (ohmyzsh#6195)
  fix(tmux): use `$ZSH_TMUX_CONFIG` setting in tmuxconf alias
  fix(ys): fix `$VIRTUAL_ENV` check if `nounset` is enabled (ohmyzsh#9915)
  fix(installer): avoid `git clone -c` to support git v1.7.1 (ohmyzsh#10621)
  fix(npx)!: detect new `npx` versions and fail gracefully (ohmyzsh#10452)
  style(updater): silence `git pull` output and show errors in English
  feat(postgres): support Homebrew for Apple Silicon (ohmyzsh#10618)
  fix(cli): make sure to run `zsh` command if an alias exists (ohmyzsh#9737)
  ...
amkirby pushed a commit to amkirby/oh-my-zsh that referenced this pull request Mar 9, 2022
cmoore pushed a commit to cmoore/oh-my-zsh that referenced this pull request Apr 28, 2022
FelixDombek pushed a commit to FelixDombek/ohmyzsh that referenced this pull request May 18, 2022
Daddelhai pushed a commit to Daddelhai/ohmyzsh that referenced this pull request Jul 4, 2022
kis87988 pushed a commit to kis87988/ohmyzsh that referenced this pull request Jul 5, 2022
tekniklr pushed a commit to tekniklr/oh-my-zsh that referenced this pull request Sep 6, 2022
rahdjoudj pushed a commit to rahdjoudj/ohmyzsh that referenced this pull request Nov 3, 2022
dilfish pushed a commit to dilfish/oh-my-zsh that referenced this pull request Feb 16, 2023
nbaronov pushed a commit to nbaronov/oh-my-zsh that referenced this pull request Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: plugin Issue or PR related to a plugin Topic: alias Pull Request or issue regarding aliases
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Postgres plugin: uses wrong Homebrew location for Apple Silicon
3 participants