Skip to content

Commit ed30a49

Browse files
committed
Fix mysql::sql task error message
Because of misplaced `"` no interpolation of the error message was actually taking place. After fixing this, the `Lint/UselessAssignment` rubocop violation that had been disabled goes away too.
1 parent 135f1c6 commit ed30a49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tasks/sql.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ def get(sql, database, user, password)
88
cmd << "--database=#{database}" unless database.nil?
99
cmd << "--user=#{user}" unless user.nil?
1010
cmd << "--password=#{password}" unless password.nil?
11-
stdout, stderr, status = Open3.capture3(*cmd) # rubocop:disable Lint/UselessAssignment
12-
raise Puppet::Error, _("stderr: ' %{stderr}') % { stderr: stderr }") if status != 0
11+
stdout, stderr, status = Open3.capture3(*cmd)
12+
raise Puppet::Error, _("stderr: '%{stderr}'" % { stderr: stderr }) if status != 0
1313
{ status: stdout.strip }
1414
end
1515

0 commit comments

Comments
 (0)