This repository was archived by the owner on Mar 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -66,12 +66,10 @@ def replace_text(text: str) -> str:
6666 return text
6767
6868 branches = list_branches (path )
69-
70- if MERGE_BRANCH in branches :
71- raise Exception (
72- f"{ MERGE_BRANCH } already exists. \
73- Please run 'python3-pip-skeleton clean' to remove it."
74- )
69+ assert MERGE_BRANCH not in branches , (
70+ f"{ MERGE_BRANCH } already exists. "
71+ "Please run 'python3-pip-skeleton clean' to remove it."
72+ )
7573 with GitTemporaryDirectory () as git_tmp :
7674 # Clone existing repo into tmp so we don't mess up if we fail
7775 # half way through
@@ -86,7 +84,8 @@ def replace_text(text: str) -> str:
8684 # Merge in the skeleton commits
8785 git_tmp ("pull" , "--rebase=false" , SKELETON , "main" )
8886 # Move things around
89- git_tmp ("mv" , "src/python3_pip_skeleton" , f"src/{ package } " )
87+ if package != "python3_pip_skeleton" :
88+ git_tmp ("mv" , "src/python3_pip_skeleton" , f"src/{ package } " )
9089 # Change contents of all children known to git
9190 for relative_child in git_tmp ("ls-files" ).splitlines ():
9291 child = Path (git_tmp .name ) / relative_child
You can’t perform that action at this time.
0 commit comments