You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would possibly stomp on any --rsync-path setting I set in the options to the Rex sync() command like in the first example above: nice -n 19 rsync.
Something like following command should be run on the remote machine, with --rsync-path only appearing once and sudo coming before the nice command and option:
Describe the bug
If I want to rsync with a nice setting of 19, I would do:
rsync --rsync-path='nice -n 19 rsync' <src> <destination>
If I want to run this with sudo, I would do:
rsync --rsync-path='sudo nice -n 19 rsync' <src> <destination>
The way the module is currently written, if
Rex::is_sudo
is true, then--rsync-path
gets set tosudo rsync
. See https://github.com/RexOps/Rex/blob/master/lib/Rex/Commands/Rsync.pm#L163This would possibly stomp on any --rsync-path setting I set in the options to the Rex
sync()
command like in the first example above:nice -n 19 rsync
.How to reproduce it
Run this in a Rex task:
Expected behavior
Something like following command should be run on the remote machine, with
--rsync-path
only appearing once andsudo
coming before thenice
command and option:rsync $source $dest --rsync-path='sudo nice -n 19 rsync'
Actual behavior
Instead, the following command gets run with
--rsync-path
appearing twice:rsync $source $dest --rsync-path='nice -n 19 rsync' --rsync-path='sudo rsync'
The text was updated successfully, but these errors were encountered: