Skip to content

Commit 72887e0

Browse files
authored
Merge pull request #247 from maluueu/244-build-ui-error
hyperglass: frontend: delete build dir before copying generated code to it
2 parents 74a6ee3 + 85fa678 commit 72887e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

hyperglass/frontend/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ async def build_ui(app_path: Path):
131131
log.error(err)
132132
raise RuntimeError(str(err)) from err
133133

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

137138
return "\n".join(all_messages)

0 commit comments

Comments
 (0)