Sort the state file as well for sanity

This commit is contained in:
Mitchell Hashimoto 2013-02-03 10:35:59 -08:00
parent 76457eff16
commit e055bc893b
1 changed files with 3 additions and 1 deletions

View File

@ -19,8 +19,9 @@ module VagrantPlugins
def add_plugin(name)
if !@data["installed"].include?(name)
@data["installed"] << name
save!
end
save!
end
# This returns a list of installed plugins according to the state
@ -35,6 +36,7 @@ module VagrantPlugins
# This saves the state back into the state file.
def save!
# Scrub some fields
@data["installed"].sort!
@data["installed"].uniq!
# Save