Set the path in macOS, so it can find /usr/local/bin/docker

This commit is contained in:
Micah Lee 2021-11-23 16:16:55 -08:00
parent b3b52c3963
commit edbd3aa88a
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
2 changed files with 3 additions and 4 deletions

View file

@ -49,6 +49,9 @@ def gui_main(filename):
# Required for macOS Big Sur: https://stackoverflow.com/a/64878899 # Required for macOS Big Sur: https://stackoverflow.com/a/64878899
os.environ["QT_MAC_WANTS_LAYER"] = "1" 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 # Strip ANSI colors from stdout output, to prevent terminal colors from breaking
# the macOS GUI app # the macOS GUI app
from strip_ansi import strip_ansi from strip_ansi import strip_ansi

View file

@ -64,10 +64,6 @@ def main():
run(["pyinstaller", "install/pyinstaller/pyinstaller.spec", "--clean"]) run(["pyinstaller", "install/pyinstaller/pyinstaller.spec", "--clean"])
shutil.rmtree(os.path.join(dist_path, "dangerzone")) shutil.rmtree(os.path.join(dist_path, "dangerzone"))
os.symlink(
"dangerzone",
os.path.join(app_path, "Contents/MacOS/dangerzone-container"),
)
os.symlink( os.symlink(
"dangerzone", "dangerzone",
os.path.join(app_path, "Contents/MacOS/dangerzone-cli"), os.path.join(app_path, "Contents/MacOS/dangerzone-cli"),