fix unhandled exception if publish target doesn't exist
It wasn't actually that we didn't create it, but that we tried to clean first and the folder to be cleaned didn't exist!
This commit is contained in:
parent
5e7a1e3d22
commit
2d33b53be6
@ -312,7 +312,10 @@ def compile_html_file(
|
|||||||
f"(To overwrite any files existing in the output folder, "
|
f"(To overwrite any files existing in the output folder, "
|
||||||
f"set overwrite = True for this builder.)")
|
f"set overwrite = True for this builder.)")
|
||||||
|
|
||||||
shutil.rmtree(output_folder)
|
try:
|
||||||
|
shutil.rmtree(output_folder)
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
shutil.copytree(
|
shutil.copytree(
|
||||||
Path(build_state['public_wiki_folder']) / "output",
|
Path(build_state['public_wiki_folder']) / "output",
|
||||||
Path(output_folder),
|
Path(output_folder),
|
||||||
@ -637,7 +640,10 @@ def editionify(target_folder: str, description: str) -> None:
|
|||||||
:param description: The description of this edition to use in the new edition's
|
:param description: The description of this edition to use in the new edition's
|
||||||
``tiddlywiki.info`` file.
|
``tiddlywiki.info`` file.
|
||||||
"""
|
"""
|
||||||
shutil.rmtree(target_folder)
|
try:
|
||||||
|
shutil.rmtree(target_folder)
|
||||||
|
except FileNotFoundError:
|
||||||
|
pass
|
||||||
shutil.copytree(
|
shutil.copytree(
|
||||||
build_state['public_wiki_folder'],
|
build_state['public_wiki_folder'],
|
||||||
target_folder,
|
target_folder,
|
||||||
|
Loading…
Reference in New Issue
Block a user