Skip to content

Commit

Permalink
RSync to respect symlinks (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiker authored Apr 4, 2024
1 parent e51cbfb commit 07ec96a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/fab/steps/grab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ def call_rsync(src: Union[str, Path], dst: Union[str, Path]):
if not src.endswith('/'):
src += '/'

command = ['rsync', '--times', '--stats', '-ru', src, str(dst)]
command = ['rsync', '--times', '--links', '--stats', '-ru', src, str(dst)]
return run_command(command)
3 changes: 2 additions & 1 deletion tests/unit_tests/steps/test_grab.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def _common(self, grab_src, expect_grab_src):
grab_folder(mock_config, src=grab_src, dst_label=dst)

expect_dst = mock_config.source_root / dst
mock_run.assert_called_once_with(['rsync', '--times', '--stats', '-ru', expect_grab_src, str(expect_dst)])
mock_run.assert_called_once_with(['rsync', '--times', '--links', '--stats',
'-ru', expect_grab_src, str(expect_dst)])


class TestGrabFcm(object):
Expand Down

0 comments on commit 07ec96a

Please sign in to comment.