diff --git a/hyperglass/frontend/__init__.py b/hyperglass/frontend/__init__.py index 508700ad..0f6c64c4 100644 --- a/hyperglass/frontend/__init__.py +++ b/hyperglass/frontend/__init__.py @@ -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)