From 08bd3291f56887eaa4ccb4c8c8f034f0942c6a1a Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Sun, 12 Aug 2018 21:25:48 -0500 Subject: [PATCH] npm ver could change apart from nac/denac,nvm so prompt should check --- env/nodez.theme.bash | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/env/nodez.theme.bash b/env/nodez.theme.bash index b5e4ff2..7aef893 100644 --- a/env/nodez.theme.bash +++ b/env/nodez.theme.bash @@ -34,6 +34,10 @@ __nodez_ne() { __nodez_nv() { if [[ -v NODE_VERSION ]]; then local nv="=${__nodez_char_node}${NODE_VERSION}" + local npm_version=$(npm --version) + if [[ "$npm_version" != "$NPM_VERSION" ]]; then + export NPM_VERSION=$npm_version + fi nv+="${__nodez_char_npm}${NPM_VERSION}]" echo "$nv" fi