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)