Skip to content

Commit

Permalink
fixes #24 and #190
Browse files Browse the repository at this point in the history
  • Loading branch information
flybyray committed Jun 24, 2021
1 parent a994a58 commit 0118bf0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugins/modules/synchronize.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,10 +548,10 @@ def main():
ssh_cmd_str = ' '.join(shlex_quote(arg) for arg in ssh_cmd)
if ssh_args:
ssh_cmd_str += ' %s' % ssh_args
cmd.append('--rsh=%s' % ssh_cmd_str)
cmd.append(shlex_quote('--rsh=%s' % ssh_cmd_str))

if rsync_path:
cmd.append('--rsync-path=%s' % rsync_path)
cmd.append(shlex_quote('--rsync-path=%s' % rsync_path))

if rsync_opts:
if '' in rsync_opts:
Expand All @@ -577,7 +577,7 @@ def main():
cmd.append('--link-dest=%s' % link_path)

changed_marker = '<<CHANGED>>'
cmd.append('--out-format=' + changed_marker + '%i %n%L')
cmd.append(shlex_quote('--out-format=' + changed_marker + '%i %n%L'))

# expand the paths
if '@' not in source:
Expand All @@ -601,10 +601,10 @@ def _write_password_to_pipe(proc):
raise

(rc, out, err) = module.run_command(
cmd, pass_fds=_sshpass_pipe,
cmdstr, pass_fds=_sshpass_pipe,
before_communicate_callback=_write_password_to_pipe)
else:
(rc, out, err) = module.run_command(cmd)
(rc, out, err) = module.run_command(cmdstr)

if rc:
return module.fail_json(msg=err, rc=rc, cmd=cmdstr)
Expand Down

0 comments on commit 0118bf0

Please sign in to comment.