@clipboard-health/ai-rules 2.14.12 → 2.14.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/setup.sh +4 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clipboard-health/ai-rules",
3
- "version": "2.14.12",
3
+ "version": "2.14.14",
4
4
  "description": "Pre-built AI agent rules for consistent coding standards.",
5
5
  "keywords": [
6
6
  "ai",
package/scripts/setup.sh CHANGED
@@ -98,15 +98,16 @@ persist_claude_env() {
98
98
  : > "$tmp"
99
99
  fi
100
100
 
101
- # Always persist general env vars; conditionally include NVM-specific lines
101
+ # Persist only the resolved PATH to the node binary — never source nvm.sh here.
102
+ # Sourcing nvm.sh on every Bash call is fragile (fails if nvm.sh is missing or
103
+ # errors out) and unnecessary since the PATH entry is sufficient for node/npm.
102
104
  local node_dir
103
105
  {
104
106
  echo "$begin"
105
107
  if command -v nvm >/dev/null 2>&1 \
106
108
  && node_dir="$(dirname "$(nvm which current)" 2>/dev/null)" \
109
+ && [[ -n "${NVM_DIR:-}" ]] \
107
110
  && [[ "$node_dir" == "$NVM_DIR"/* ]]; then
108
- echo "export NVM_DIR=\"$NVM_DIR\""
109
- echo ". \"\$NVM_DIR/nvm.sh\" --no-use"
110
111
  echo "export PATH=\"$node_dir:\$PATH\""
111
112
  fi
112
113
  echo "export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true"