File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,16 @@ def copy_replay_file() -> None:
152152 # the generated project.
153153 replay_data ["cookiecutter" ].pop ("_output_dir" , None )
154154
155+ if template := replay_data ["cookiecutter" ].get ("_template" ):
156+ if not template .startswith (("gh:" , "git@" , "https://" )):
157+ print (
158+ f"WARNING: The replay file's `_template` ({ template } ) doesn't seem "
159+ "to be a remote repository, it won't be saved to avoid storing a "
160+ "local template in the new repository. If this is incorrect, "
161+ f"please add it back manually to { dst } ."
162+ )
163+ replay_data ["cookiecutter" ].pop ("_template" , None )
164+
155165 with dst .open ("w" , encoding = "utf8" ) as output_file :
156166 _json .dump (replay_data , output_file , indent = 2 )
157167 except KeyError as error :
You can’t perform that action at this time.
0 commit comments