Skip to content

Commit

Permalink
Always call freeze_support() if sys.frozen is True
Browse files Browse the repository at this point in the history
This shouldn't be necessary, but in practice macOS also requires
freeze_support() so let's play it safe and always call it when
sys.frozen is truthy. Only a tiny sliver of users will be using these
PyInstaller executables and the start-up performance is already terrible
as the executable unzips itself on the fly anyway.
  • Loading branch information
ichard26 committed Sep 17, 2022
1 parent d852af7 commit 1673033
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/black/__init__.py
Expand Up @@ -1375,7 +1375,7 @@ def patch_click() -> None:


def patched_main() -> None:
if sys.platform == "win32" and getattr(sys, "frozen", False):
if getattr(sys, "frozen", False):
from multiprocessing import freeze_support

freeze_support()
Expand Down

0 comments on commit 1673033

Please sign in to comment.