From 5cb2f3275a9d3d953b5c3f02163f3c36c9788f12 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 26 Dec 2012 20:02:03 -0800 Subject: [PATCH] Get rid of a silly constant for subdirs in Environment The data is only used once anyways so just use a local variable. --- lib/vagrant/environment.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/vagrant/environment.rb b/lib/vagrant/environment.rb index 1087744fd..ad9110db8 100644 --- a/lib/vagrant/environment.rb +++ b/lib/vagrant/environment.rb @@ -12,7 +12,6 @@ module Vagrant # defined as basically a folder with a "Vagrantfile." This class allows # access to the VMs, CLI, etc. all in the scope of this environment. class Environment - HOME_SUBDIRS = ["tmp", "boxes", "gems"] DEFAULT_HOME = "~/.vagrant.d" DEFAULT_RC = "~/.vagrantrc" @@ -415,9 +414,11 @@ module Vagrant DEFAULT_HOME)) @logger.info("Home path: #{@home_path}") - # Setup the array of necessary home directories - dirs = [@home_path] - dirs += HOME_SUBDIRS.collect { |subdir| @home_path.join(subdir) } + # Setup the list of child directories that need to be created if they + # don't already exist. + dirs = [@home_path] + subdirs = ["tmp", "boxes", "gems"] + dirs += subdirs.collect { |subdir| @home_path.join(subdir) } # Go through each required directory, creating it if it doesn't exist dirs.each do |dir|