Get rid of a silly constant for subdirs in Environment
The data is only used once anyways so just use a local variable.
This commit is contained in:
parent
d54d58c09c
commit
5cb2f3275a
|
@ -12,7 +12,6 @@ module Vagrant
|
||||||
# defined as basically a folder with a "Vagrantfile." This class allows
|
# defined as basically a folder with a "Vagrantfile." This class allows
|
||||||
# access to the VMs, CLI, etc. all in the scope of this environment.
|
# access to the VMs, CLI, etc. all in the scope of this environment.
|
||||||
class Environment
|
class Environment
|
||||||
HOME_SUBDIRS = ["tmp", "boxes", "gems"]
|
|
||||||
DEFAULT_HOME = "~/.vagrant.d"
|
DEFAULT_HOME = "~/.vagrant.d"
|
||||||
DEFAULT_RC = "~/.vagrantrc"
|
DEFAULT_RC = "~/.vagrantrc"
|
||||||
|
|
||||||
|
@ -415,9 +414,11 @@ module Vagrant
|
||||||
DEFAULT_HOME))
|
DEFAULT_HOME))
|
||||||
@logger.info("Home path: #{@home_path}")
|
@logger.info("Home path: #{@home_path}")
|
||||||
|
|
||||||
# Setup the array of necessary home directories
|
# Setup the list of child directories that need to be created if they
|
||||||
dirs = [@home_path]
|
# don't already exist.
|
||||||
dirs += HOME_SUBDIRS.collect { |subdir| @home_path.join(subdir) }
|
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
|
# Go through each required directory, creating it if it doesn't exist
|
||||||
dirs.each do |dir|
|
dirs.each do |dir|
|
||||||
|
|
Loading…
Reference in New Issue