Trigger plugin activation by setting cache scope [GH-17]

This commit is contained in:
Fabio Rehm 2014-02-11 23:24:48 -02:00
parent 95b939a315
commit e793dff891

View file

@ -46,7 +46,7 @@ module VagrantPlugins
def enabled? def enabled?
return @enabled unless @enabled.nil? return @enabled unless @enabled.nil?
@enabled = (@auto_detect != UNSET_VALUE || @buckets != nil) @enabled = @scope != UNSET_VALUE
end end
def disable! def disable!
@ -56,8 +56,7 @@ module VagrantPlugins
def finalize! def finalize!
return unless enabled? return unless enabled?
@scope = :box if @scope == UNSET_VALUE @auto_detect = true if @auto_detect == UNSET_VALUE
@auto_detect = false if @auto_detect == UNSET_VALUE
@synced_folder_opts = nil if @synced_folder_opts == UNSET_VALUE @synced_folder_opts = nil if @synced_folder_opts == UNSET_VALUE
@buckets = @buckets ? @buckets.dup : {} @buckets = @buckets ? @buckets.dup : {}
end end