Closed jonekdahl closed 9 years ago
@johnbellone , Thank you very much for your pull request!
I have tried on my vagrant with your gem on CentOS 6.5. It works for me.
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
:
config.proxy.http = "http://10.0.2.2:3128/"
:
[vagrant@localhost /]$ npm config get proxy
http://10.0.2.2:3128/
[vagrant@localhost /]$ cat /usr/etc/npmrc
proxy = http://10.0.2.2:3128/
[vagrant@localhost /]$
@tmatilai If you don't have any indications, I think we can merge this PR.
@jonekdahl thanks! I don't understand how I missed that in the first place.
But setting the proxy to "foo" would normally result in DNS resolver error, wouldn't it? I think the correct way is to fetch the global config path with npm config get globalconfig
. I'll add that and merge.
Ah, now I get it. Still feels dirty to me. :)
Uh, we would also need to make sure that the parent directory exists. I'll give up, this is just fine. =)
This pull request fixes #89. It uses the
--global
option of npm config which places the proxy configurations in the system wide configuration file. Tested on Ubuntu 14.04.