diff --git a/CHANGELOG.md b/CHANGELOG.md index 666d470..4a1d417 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,13 @@ # 0.1.1 / _Not released yet_ +- Don't crash if there is no configuration for us in the Vagrantfiles ([GH-2]) + * Related [Vagrant issue](https://github.com/mitchellh/vagrant/issues/1877) # 0.1.0 / 2013-06-27 - Initial release - Support for Apt proxy configuration - Based heavily on [vagrant-cachier](https://github.com/fgrehm/vagrant-cachier) plugin + + +[GH-2]: https://github.com/tmatilai/vagrant-proxyconf/issues/2 "Issue 2" diff --git a/lib/vagrant-proxyconf/action/configure_apt_proxy.rb b/lib/vagrant-proxyconf/action/configure_apt_proxy.rb index 84a4020..dff4237 100644 --- a/lib/vagrant-proxyconf/action/configure_apt_proxy.rb +++ b/lib/vagrant-proxyconf/action/configure_apt_proxy.rb @@ -15,6 +15,12 @@ def call(env) @app.call env proxy_config = env[:machine].config.apt_proxy + + # Vagrant does not seem to call `finalize!` if the configuration + # key is not used in Vagrantfiles. + # https://github.com/tmatilai/vagrant-proxyconf/issues/2 + proxy_config.finalize! + if !proxy_config.enabled? logger.debug "apt_proxy not enabled or configured" elsif !proxy_conf_capability?(env[:machine])