Clear config after load paths are setup

This commit is contained in:
Mitchell Hashimoto 2010-02-23 23:56:53 -08:00
parent 71abd76fae
commit 2ee850011b
1 changed files with 5 additions and 2 deletions

View File

@ -28,17 +28,20 @@ module Vagrant
end
def load_config!
# Prepare load paths for config files
load_paths = [File.join(PROJECT_ROOT, "config", "default.rb")]
load_paths << File.join(box.directory, ROOTFILE_NAME) if box
load_paths << File.join(root_path, ROOTFILE_NAME)
# Then clear out the old data
Config.reset!
load_paths.each do |path|
logger.info "Loading config from #{path}..."
load path if File.exist?(path)
end
# Execute the configurations, clearing out the old data
Config.reset!
# Execute the configurations
Config.execute!
end