Skip to content

Commit

Permalink
🐛 safety check for dotme-node and dotme-test
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhomer committed Nov 19, 2023
1 parent 012033f commit 06ba9c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/dotme-node
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ set -e
NODE_GLOBAL=~/.dotfiles/config/node/global.txt
should-run -m 14 $@ $0 $NODE_GLOBAL || exit 0
$(shim) && cd ${ME} && . bin/i.sh

#
# Set up nvm
#
[ ! -d ~/.nvm ] && mkdir ~/.nvm

if ! command -v node ; then
log::info "node not installed"
exit
fi

#
# Node is installed with brew and pnpm installed with corepack
#
Expand Down
5 changes: 5 additions & 0 deletions bin/dotme-test
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ set -e
should-run -m 7 $@ $0 || exit 0
$(shim) && cd ${ME} && . bin/i.sh

if ! command -v node ; then
log::info "pnpm not installed"
exit
fi

cd ${ME}/test
# packages must be installed in test so that LSP completion works on test files

Expand Down

0 comments on commit 06ba9c1

Please sign in to comment.