Skip to content

Commit

Permalink
[Refactor] Reduce a sed command with pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterDaveHello authored and ljharb committed Apr 4, 2017
1 parent f524bcb commit 3f5fd57
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,7 @@ nvm_check_global_modules() {
local NPM_GLOBAL_MODULES
NPM_GLOBAL_MODULES="$(
npm list -g --depth=0 |
command sed '/ npm@/d' |
command sed '/ (empty)$/d'
command sed -e '/ npm@/d' -e '/ (empty)$/d'
)"

local MODULE_COUNT
Expand Down

0 comments on commit 3f5fd57

Please sign in to comment.