From ca48830242efcfc308cb21c97a4efcc10e42363b Mon Sep 17 00:00:00 2001 From: Tony Blyler Date: Fri, 9 Dec 2022 01:19:47 -0500 Subject: [PATCH] Add some pnpm goodness to ~/.zshenv and update zsh to utilize the builtin OSTYPE environment variable rather than `uname` --- chezmoi/dot_zshenv | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/chezmoi/dot_zshenv b/chezmoi/dot_zshenv index 5d7cae1..50e70a4 100644 --- a/chezmoi/dot_zshenv +++ b/chezmoi/dot_zshenv @@ -17,7 +17,7 @@ fi export VISUAL="${EDITOR}" -if [ "$(uname)" = "Darwin" ]; then +if [[ "$OSTYPE" =~ ^darwin ]]; then if [ -x /opt/homebrew/bin/brew ]; then eval "$(/opt/homebrew/bin/brew shellenv)" fi @@ -49,6 +49,14 @@ fi . "$HOME/.cargo/env" 2>/dev/null +if command -v pnpm &> /dev/null; then + if [[ "$OSTYPE" =~ ^darwin ]]; then + export PNPM_HOME="${HOME}/Library/pnpm" + export PATH="$PNPM_HOME:$PATH" + mkdir -p PNPM_HOME + fi +fi + if command -v go &> /dev/null; then GOPATH="$(go env GOPATH)" if [ -d "${GOPATH}" ]; then