mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
Fix linter
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
This commit is contained in:
parent
7d91371d9f
commit
0cf4d3dcf4
1 changed files with 2 additions and 0 deletions
|
@ -45,11 +45,13 @@ module Inspec::Resources
|
|||
@socket = socket
|
||||
init_fallback if user.nil? || pass.nil?
|
||||
raise Inspec::Exceptions::ResourceFailed, "Can't run MySQL SQL checks without authentication." if @user.nil? || @pass.nil?
|
||||
|
||||
set_connection
|
||||
end
|
||||
|
||||
def query(q, db = "")
|
||||
raise Inspec::Exceptions::ResourceFailed, "#{resource_exception_message}" if self.resource_failed?
|
||||
|
||||
mysql_cmd = create_mysql_cmd(q, db)
|
||||
cmd = if !@pass.nil?
|
||||
inspec.command(mysql_cmd, redact_regex: /(mysql -u\w+ -p).+(\s-(h|S).*)/)
|
||||
|
|
Loading…
Add table
Reference in a new issue