From edbd3aa88ad6bdf7380d0d6380a9f369cd21bff1 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Tue, 23 Nov 2021 16:16:55 -0800 Subject: [PATCH] Set the path in macOS, so it can find /usr/local/bin/docker --- dangerzone/gui/__init__.py | 3 +++ install/macos/build-app.py | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dangerzone/gui/__init__.py b/dangerzone/gui/__init__.py index 4c8fe0f..8293c7e 100644 --- a/dangerzone/gui/__init__.py +++ b/dangerzone/gui/__init__.py @@ -49,6 +49,9 @@ def gui_main(filename): # Required for macOS Big Sur: https://stackoverflow.com/a/64878899 os.environ["QT_MAC_WANTS_LAYER"] = "1" + # Make sure /usr/local/bin is in the path + os.environ["PATH"] = "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" + # Strip ANSI colors from stdout output, to prevent terminal colors from breaking # the macOS GUI app from strip_ansi import strip_ansi diff --git a/install/macos/build-app.py b/install/macos/build-app.py index 4ee9b29..47efff7 100755 --- a/install/macos/build-app.py +++ b/install/macos/build-app.py @@ -64,10 +64,6 @@ def main(): run(["pyinstaller", "install/pyinstaller/pyinstaller.spec", "--clean"]) shutil.rmtree(os.path.join(dist_path, "dangerzone")) - os.symlink( - "dangerzone", - os.path.join(app_path, "Contents/MacOS/dangerzone-container"), - ) os.symlink( "dangerzone", os.path.join(app_path, "Contents/MacOS/dangerzone-cli"),