diff --git a/lib/inspec/resources/postgres_session.rb b/lib/inspec/resources/postgres_session.rb index 55fdd6ccd..66af08e95 100644 --- a/lib/inspec/resources/postgres_session.rb +++ b/lib/inspec/resources/postgres_session.rb @@ -51,7 +51,7 @@ module Inspec::Resources end def query(query, db = []) - raise Inspec::Exceptions::ResourceFailed, "#{resource_exception_message}" if self.resource_failed? + raise Inspec::Exceptions::ResourceFailed, "#{resource_exception_message}" if resource_failed? psql_cmd = create_psql_cmd(query, db) cmd = inspec.command(psql_cmd, redact_regex: /(PGPASSWORD=').+(' psql .*)/)