Skip to content

Commit

Permalink
Merge pull request #1243 from alexjfisher/fix_task_error_message
Browse files Browse the repository at this point in the history
Fix mysql::sql task error message
  • Loading branch information
michaeltlombardi authored Oct 16, 2019
2 parents c04c1a6 + 973c46e commit ab9292e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tasks/export.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ def get(file, database, user, password)
cmd_string << " --user=#{user}" unless user.nil?
cmd_string << " --password=#{password}" unless password.nil?
cmd_string << " > #{file}" unless file.nil?
stdout, _stderr, status = Open3.capture3(cmd_string)
raise Puppet::Error, _("stderr: ' %{stderr}') % { stderr: stderr }") if status != 0
stdout, stderr, status = Open3.capture3(cmd_string)
raise Puppet::Error, _("stderr: '%{stderr}'" % { stderr: stderr }) if status != 0
{ status: stdout.strip }
end

Expand Down
4 changes: 2 additions & 2 deletions tasks/sql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ def get(sql, database, user, password)
cmd << "--database=#{database}" unless database.nil?
cmd << "--user=#{user}" unless user.nil?
cmd << "--password=#{password}" unless password.nil?
stdout, stderr, status = Open3.capture3(*cmd) # rubocop:disable Lint/UselessAssignment
raise Puppet::Error, _("stderr: ' %{stderr}') % { stderr: stderr }") if status != 0
stdout, stderr, status = Open3.capture3(*cmd)
raise Puppet::Error, _("stderr: '%{stderr}'" % { stderr: stderr }) if status != 0
{ status: stdout.strip }
end

Expand Down

0 comments on commit ab9292e

Please sign in to comment.