Skip to content

Commit a3de3d1

Browse files
committed
Ensure that file exists before copying for local build.
1 parent 4558e0f commit a3de3d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sphinx_polyversion/driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ async def build_local(self) -> None:
342342
source = self.root / filename
343343
target = path / filename
344344
target.parent.mkdir(parents=True, exist_ok=True)
345-
if not target.exists():
345+
if source.exists() and not target.exists():
346346
shutil.copy2(source, target, follow_symlinks=False)
347347

348348
# as .git is not copied, we have to initialize a dummy git repository

0 commit comments

Comments
 (0)