mitchellh/vagrant — pull request #1033 by conormcd (2012-07-18 13:47:30+00:00)
Title: Only mark environment loaded after load_config

If `load_config` fails, `@loaded` should still be false.

Otherwise, stuff like this fails oddly:

env = Vagrant::Environment.new(:cwd => '/some/directory')
begin
env.cli("up")
rescue Vagrant::Errors::VagrantError => err
puts err.message
ensure
if env.loaded?
env.cli("destroy", "-f")
end
end