From 363aaeaba8353bde7924b72c70b9b10440724e5f Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Sun, 23 Jan 2022 10:42:11 +0200 Subject: [PATCH] Fix symbolic links not copied from cached VCS into working copy. Windows platform will result with default copy content instead of original symbolic link (issue #89) --- clearml_agent/helper/repo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clearml_agent/helper/repo.py b/clearml_agent/helper/repo.py index 0a4ccc3..cc83dbe 100644 --- a/clearml_agent/helper/repo.py +++ b/clearml_agent/helper/repo.py @@ -663,7 +663,9 @@ def clone_repository_cached(session, execution, destination): vcs.pull() rm_tree(destination) - shutil.copytree(Text(cached_repo_path), Text(clone_folder)) + shutil.copytree(Text(cached_repo_path), Text(clone_folder), + symlinks=select_for_platform(linux=True, windows=False), + ignore_dangling_symlinks=True) if not clone_folder.is_dir(): raise CommandFailedError( "copying of repository failed: from {} to {}".format(