Homebrew/homebrew — pull request #27479 by chevex (2014-03-12 17:33:40+00:00)
Title: Homebrew should no longer manage npm.

[This discussion](https://github.com/npm/npm/issues/3794) has been ongoing for a while now and it seems to have come to a consensus. When homebrew installs npm it breaks the ability for npm to update itself. This wouldn't be a big deal if we never let npm update itslef, but the reality is that's not really practical.

With npm you can run `npm update -g` (which is standard practice) and it will update all global node modules, including npm. When this happens after homebrew installed npm it completely breaks npm so that it no longer functions at all. The only way to fix it is to re-install npm. Installing this brew formula without npm and then installing npm separately fixes the issue and allows npm to manage itself appropriately.

We came up with two options:

1. Brew formula should only install node and simply display the curl script to install npm at the end (what this PR does).

2. Brew should install and manage node and then run the curl script itself at the end.

I'm not familiar enough with homebrew or Ruby to even know if it's possible to run the curl script at the end of the node install so I went ahead and did my best to implement option 1. Please feel free to point out any issues with my changes; as I said, I'm not a Ruby developer, so I probably made a few mistakes I'm sure.

Option 2 would be the best since it would allow brew to install npm initially, but then let it update itself thereafter. If someone reading this thinks it's possible to do that then please do so; I know that lots of us would be very grateful :)