revert unrelated

This commit is contained in:
kadarakos 2022-09-16 09:53:51 +00:00
parent 3f475477ae
commit b586066598

View File

@ -404,10 +404,7 @@ def git_checkout(
if not is_subpath_of(tmp_dir, source_path):
err = f"'{subpath}' is a path outside of the cloned repository."
msg.fail(err, repo, exits=1)
if source_path.is_dir():
shutil.copytree(str(source_path), str(dest))
else:
shutil.copy(str(source_path), str(dest))
shutil.copytree(str(source_path), str(dest))
except FileNotFoundError:
err = f"Can't clone {subpath}. Make sure the directory exists in the repo (branch '{branch}')"
msg.fail(err, repo, exits=1)