Skip to content

Instantly share code, notes, and snippets.

@treetips
Created August 25, 2022 18:41
Show Gist options
  • Save treetips/b6f1cf29ddf486710ca089b3f8038f43 to your computer and use it in GitHub Desktop.
Save treetips/b6f1cf29ddf486710ca089b3f8038f43 to your computer and use it in GitHub Desktop.
Generate ~/.huskyrc
cat << 'EOT' > ~/.huskyrc
if [[ -d '/home/linuxbrew/.linuxbrew' ]]; then
# Linux/WSL
HOMEBREW_HOME='/home/linuxbrew/.linuxbrew'
elif [[ -d '/opt/homebrew' ]]; then
# Apple Silicon Mac
HOMEBREW_HOME='/opt/homebrew'
else
# Intel Mac
HOMEBREW_HOME='/usr/local'
fi
eval "$($HOMEBREW_HOME/bin/brew shellenv)"
eval "$($HOMEBREW_HOME/bin/fnm env)"
EOT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment