From 4c7bde09c77a1ba2a40d311fe988daf5d94ee3c8 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Wed, 10 Feb 2021 15:49:05 -0800 Subject: [PATCH] Fix macOS close immediately bug --- install/pyinstaller/dangerzone | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/install/pyinstaller/dangerzone b/install/pyinstaller/dangerzone index 588949727..4d8eeb4e8 100755 --- a/install/pyinstaller/dangerzone +++ b/install/pyinstaller/dangerzone @@ -1,4 +1,11 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- + +# After much terrible troubleshooting, turns out this is required to allow Dangerzone +# to open in macOS when double-clicking, not just when running from the terminal or opening +# with a file. +import os +os.environ["LANG"] = "en_US.UTF-8" + import dangerzone -dangerzone.main() \ No newline at end of file +dangerzone.main()