migrate to the new tiered structure
This commit is contained in:
15
example/.safeclaude/hooks/15-node.sh.example
Normal file
15
example/.safeclaude/hooks/15-node.sh.example
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# OPTIONAL — only needed if your project pins a Node version via .nvmrc (the base
|
||||
# already includes a working Node). Rename to 15-node.sh to turn it on.
|
||||
set -euo pipefail
|
||||
|
||||
if [ ! -s "$NVM_DIR/nvm.sh" ]; then
|
||||
echo "[node] installing nvm..."
|
||||
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/HEAD/install.sh \
|
||||
| NVM_DIR="$NVM_DIR" PROFILE=/dev/null bash
|
||||
fi
|
||||
. "$NVM_DIR/nvm.sh"
|
||||
|
||||
if [ -f /code/.nvmrc ]; then
|
||||
( cd /code && nvm install && nvm use )
|
||||
fi
|
||||
Reference in New Issue
Block a user