Skip to content

Commit

Permalink
Ignore missing build directory
Browse files Browse the repository at this point in the history
  • Loading branch information
insolor committed Jul 20, 2024
1 parent a1141dd commit 674c6b4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion package_build/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from package_build.download_parts import DownloadedParts
from package_build.models import HookInfoEntry
import contextlib


def zip_directory(directory: Path, filename: Path) -> None:
Expand All @@ -21,7 +22,9 @@ def build_package(
parts: DownloadedParts,
is_win: bool,
) -> None:
shutil.rmtree(build_dir)
with contextlib.suppress(FileNotFoundError):
shutil.rmtree(build_dir)

build_dir.mkdir(parents=True)

package_path.unlink(missing_ok=True)
Expand Down

0 comments on commit 674c6b4

Please sign in to comment.