guarinogabriel / Mac-CLI

 macOS command line tool for developers – The ultimate tool to manage your Mac. It provides a huge set of command line commands that automatize the usage of your Mac.
MIT License
8.88k stars 333 forks source link

Detect NVM #23

Closed michaelowens closed 8 years ago

michaelowens commented 8 years ago

Currently certain path's are hardcoded (e.g. speedtest). When using NVM, you have a path variable $NVM_BIN available to get the path to the correct node_modules/bin folder. Would be nice to detect if this is present and use that instead, so it works properly for NVM users.

e.g. current hardcoded path vs $NVM_BIN:

$ ls /usr/local/lib/node_modules/
npm

$ ls $NVM_BIN
asar                     babel-external-helpers   bode-debug               elm-oracle               ied                      imageOptimBashLib        node-debug               npm                      pngquant                 wilfred
babel                    babel-node               boiler                   eslint                   imageOptim               ncu                      node-inspector           npm-check-updates        speed-test
babel-doctor             babel-node-debug         electron                 gulp                     imageOptimAppleScriptLib node                     nodemon                  nsp                      vue

(As you can see that includes speed-test)

guarinogabriel commented 8 years ago

@michaelowens Awesome! Thanks for suggesting this. The improvement will be implemented soon.

guarinogabriel commented 8 years ago

@michaelowens Could you please contribute on the project by adding this feature?