From 06ba9c1c9c67f0a4dad6c6d03da1c8e73d882110 Mon Sep 17 00:00:00 2001 From: Ian Homer Date: Sun, 19 Nov 2023 06:33:33 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20safety=20check=20for=20dotme-nod?= =?UTF-8?q?e=20and=20dotme-test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/dotme-node | 6 +++++- bin/dotme-test | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/dotme-node b/bin/dotme-node index 2a004117..8e931225 100755 --- a/bin/dotme-node +++ b/bin/dotme-node @@ -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 # diff --git a/bin/dotme-test b/bin/dotme-test index 8c24bd7d..e0964a9b 100755 --- a/bin/dotme-test +++ b/bin/dotme-test @@ -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