Skip to content

Commit

Permalink
Add dedpulication to command construct
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Klychkov <[email protected]>
  • Loading branch information
laurent-indermuehle and Andersson007 authored Jun 23, 2022
1 parent 0b3d793 commit 85696fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/modules/mysql_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,10 @@ def db_dump(module, host, user, password, db_name, target, all_databases, port,
elif os.path.splitext(target)[-1] == '.xz':
path = module.get_bin_path('xz', True)

if pipefail and path:
cmd = 'set -o pipefail && %s | %s > %s' % (cmd, path, shlex_quote(target))
elif path:
if path:
cmd = '%s | %s > %s' % (cmd, path, shlex_quote(target))
if pipefail:
cmd = 'set -o pipefail && ' + cmd
else:
cmd += " > %s" % shlex_quote(target)

Expand Down

0 comments on commit 85696fe

Please sign in to comment.