mirror of
https://github.com/inspec/inspec
synced 2024-11-10 23:24:18 +00:00
fixing rubocop error
This commit is contained in:
parent
85988aab9c
commit
925da00b3d
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ module Inspec::Resources
|
||||||
skip_resource('user and pass are required for MSSQL tests') if @user.nil? or @pass.nil?
|
skip_resource('user and pass are required for MSSQL tests') if @user.nil? or @pass.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
def query(q, db = '')
|
def query(q)
|
||||||
escaped_query = q.gsub(/\\/, '\\\\').gsub(/"/, '\\"').gsub(/\$/, '\\$').gsub(/\@/, '`@')
|
escaped_query = q.gsub(/\\/, '\\\\').gsub(/"/, '\\"').gsub(/\$/, '\\$').gsub(/\@/, '`@')
|
||||||
cmd = inspec.command("sqlcmd -U #{@user} -P #{@pass} -Q \"#{escaped_query}\"")
|
cmd = inspec.command("sqlcmd -U #{@user} -P #{@pass} -Q \"#{escaped_query}\"")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue