Sort the state file as well for sanity
This commit is contained in:
parent
76457eff16
commit
e055bc893b
|
@ -19,8 +19,9 @@ module VagrantPlugins
|
||||||
def add_plugin(name)
|
def add_plugin(name)
|
||||||
if !@data["installed"].include?(name)
|
if !@data["installed"].include?(name)
|
||||||
@data["installed"] << name
|
@data["installed"] << name
|
||||||
save!
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
save!
|
||||||
end
|
end
|
||||||
|
|
||||||
# This returns a list of installed plugins according to the state
|
# 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.
|
# This saves the state back into the state file.
|
||||||
def save!
|
def save!
|
||||||
# Scrub some fields
|
# Scrub some fields
|
||||||
|
@data["installed"].sort!
|
||||||
@data["installed"].uniq!
|
@data["installed"].uniq!
|
||||||
|
|
||||||
# Save
|
# Save
|
||||||
|
|
Loading…
Reference in New Issue