lib/rconf/configurator.rb in rconf-0.8.5 vs lib/rconf/configurator.rb in rconf-0.8.8

- old
+ new

@@ -129,14 +129,15 @@ # true:: Always return true def run(*args) key = "#{self.class.key}-#{@index}" sha = Profile.configurator_signature(key) sig = signature - if Profile.force_reconfigure? || - (Profile.force_check? || sha != sig && (only_if.nil? || instance_eval(only_if)) && !check) - Platform.dispatch(*args) { :run } - Profile.set_configurator_signature(key, sig) + must_configure = Profile.force_reconfigure? + if !must_configure && (only_if.nil? || instance_eval(only_if)) + must_configure = (Profile.force_check? || sha != sig) && !check end + Platform.dispatch(*args) { :run } if must_configure + Profile.set_configurator_signature(key, sig) true end # Called even if configuration is already done for steps that must # always happen, do nothing by default