We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5620697 commit 78aa60aCopy full SHA for 78aa60a
hooks/post_gen_project.py
@@ -2,6 +2,7 @@
2
import json
3
import shutil
4
import stat
5
+import tempfile
6
from pathlib import Path
7
from typing import Any
8
from typing import Callable
@@ -42,6 +43,10 @@ def remove_undesired_files() -> None:
42
43
44
This is done to avoid issues that tend to arise when the name of the template file contains a conditional.
45
"""
46
+ tmp_dir_root: Path = Path(tempfile.gettempdir()).parent
47
+ if Path.cwd().is_relative_to(tmp_dir_root):
48
+ return
49
+
50
for path in REMOVE_PATHS:
51
if path == "":
52
continue
0 commit comments