[Refactor] Reduce a sed command with pipe
parent
f524bcb973
commit
3f5fd57881
|
@ -242,8 +242,7 @@ nvm_check_global_modules() {
|
||||||
local NPM_GLOBAL_MODULES
|
local NPM_GLOBAL_MODULES
|
||||||
NPM_GLOBAL_MODULES="$(
|
NPM_GLOBAL_MODULES="$(
|
||||||
npm list -g --depth=0 |
|
npm list -g --depth=0 |
|
||||||
command sed '/ npm@/d' |
|
command sed -e '/ npm@/d' -e '/ (empty)$/d'
|
||||||
command sed '/ (empty)$/d'
|
|
||||||
)"
|
)"
|
||||||
|
|
||||||
local MODULE_COUNT
|
local MODULE_COUNT
|
||||||
|
|
Loading…
Reference in New Issue