Skip to content

Commit

Permalink
Merge pull request #247 from maluueu/244-build-ui-error
Browse files Browse the repository at this point in the history
hyperglass: frontend: delete build dir before copying generated code to it
  • Loading branch information
thatmattlove authored Jun 1, 2024
2 parents 74a6ee3 + 85fa678 commit 72887e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hyperglass/frontend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ async def build_ui(app_path: Path):
log.error(err)
raise RuntimeError(str(err)) from err

shutil.copytree(src=out_dir, dst=build_dir, dirs_exist_ok=True)
shutil.rmtree(build_dir)
shutil.copytree(src=out_dir, dst=build_dir, dirs_exist_ok=False)
log.bind(src=out_dir, dst=build_dir).debug("Migrated Next.JS build output")

return "\n".join(all_messages)
Expand Down

0 comments on commit 72887e0

Please sign in to comment.