lib/service_skeleton/config.rb in service_skeleton-0.0.0.41.g9507cda vs lib/service_skeleton/config.rb in service_skeleton-0.0.0.43.g678698a

- old
+ new

@@ -43,12 +43,16 @@ define_singleton_method(:"#{method_name}=") do |new_value| val = new_value end end.each do |var| - if var.redact!(env) && env.object_id != ENV.object_id - raise ServiceSkeleton::Error::CannotSanitizeEnvironmentError, - "Attempted to sanitize sensitive variable #{var.name}, but we're not operating on the process' environment" + if var.redact?(env) + if env.object_id != ENV.object_id + raise ServiceSkeleton::Error::CannotSanitizeEnvironmentError, + "Attempted to sanitize sensitive variable #{var.name}, but we're not operating on the process' environment" + else + var.redact!(env) + end end end end def setup_logger