Skip to content

Commit f21edf2

Browse files
committed
Fix updating lib projects
`lib` projects need to recursively move the top-level `src/frequenz` package as it doesn't follow the rules of other type of projects and for that we need to account for the target directory already existing. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent aa181a1 commit f21edf2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cookiecutter/hooks/post_gen_project.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,9 @@ def finish_lib_setup() -> None:
406406
- `lib`: `src/frequenz/{name}`
407407
- `rest`: `src/frequenz/{type}/{name}`
408408
"""
409-
_pathlib.Path(f"src/frequenz/{cookiecutter.type}/{cookiecutter.name}").rename(
410-
f"src/frequenz/{cookiecutter.name}"
409+
recursive_overwrite_move(
410+
_pathlib.Path(f"src/frequenz/{cookiecutter.type}/{cookiecutter.name}"),
411+
_pathlib.Path(f"src/frequenz/{cookiecutter.name}"),
411412
)
412413
_pathlib.Path(f"src/frequenz/{cookiecutter.type}").rmdir()
413414

0 commit comments

Comments
 (0)