From e055bc893ba1b3d310026ccdc2c4eaf01a4d03fc Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 3 Feb 2013 10:35:59 -0800 Subject: [PATCH] Sort the state file as well for sanity --- plugins/commands/plugin/state_file.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/commands/plugin/state_file.rb b/plugins/commands/plugin/state_file.rb index 0371f74cd..3d6792d04 100644 --- a/plugins/commands/plugin/state_file.rb +++ b/plugins/commands/plugin/state_file.rb @@ -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