Skip to content

Commit

Permalink
Merge pull request #2 from tmatilai/finalize-config
Browse files Browse the repository at this point in the history
Plugin crashes Vagrant if nothing is configured
  • Loading branch information
tmatilai committed Jun 27, 2013
2 parents 20de460 + f335dc3 commit ba01107
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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"
6 changes: 6 additions & 0 deletions lib/vagrant-proxyconf/action/configure_apt_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit ba01107

Please sign in to comment.