From b58606659856543629b7c3718ec3d30e200b1c00 Mon Sep 17 00:00:00 2001 From: kadarakos Date: Fri, 16 Sep 2022 09:53:51 +0000 Subject: [PATCH] revert unrelated --- spacy/cli/_util.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/spacy/cli/_util.py b/spacy/cli/_util.py index 296e17563..3506bdde7 100644 --- a/spacy/cli/_util.py +++ b/spacy/cli/_util.py @@ -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)