mirror of
https://github.com/thatmattlove/hyperglass.git
synced 2026-01-17 08:48:05 +00:00
fix leftover issue from #247 if build_dir does not exist
This commit is contained in:
parent
72887e0f9a
commit
ad88d025c2
1 changed files with 4 additions and 1 deletions
|
|
@ -131,7 +131,10 @@ async def build_ui(app_path: Path):
|
|||
log.error(err)
|
||||
raise RuntimeError(str(err)) from err
|
||||
|
||||
shutil.rmtree(build_dir)
|
||||
if build_dir.exists():
|
||||
shutil.rmtree(build_dir)
|
||||
else:
|
||||
build_dir.mkdir()
|
||||
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")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue