Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mysql::sql task error message #1243

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions tasks/export.rb
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
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