Skip to content

Commit

Permalink
feat: Support alternative version managers
Browse files Browse the repository at this point in the history
Conditionally sourcing a Jetpack install script allows both default
support for nvm and the option to use alternatives, e.g. asdf-vm.
  • Loading branch information
dcalhoun committed Jul 11, 2022
1 parent 024409d commit fd723f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
.env.development.local
.env.test.local
.env.production.local
install-jetpack.sh.local

npm-debug.log*
yarn-debug.log*
Expand Down
6 changes: 6 additions & 0 deletions bin/install-jetpack.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/bin/bash
set -Eeuo pipefail

if [ -e ./bin/install-jetpack.sh.local ]
then
source ./bin/install-jetpack.sh.local
exit 0
fi

# Check if nvm is installed
[ -z "$NVM_DIR" ] && NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
Expand Down

0 comments on commit fd723f1

Please sign in to comment.