From d6aef54adbfb0bb720ecd82afd18caa8fcb60595 Mon Sep 17 00:00:00 2001 From: der richter Date: Sun, 13 Oct 2024 14:48:29 +0200 Subject: [PATCH] mac/app: add homebrew ARM install paths to the bundle PATH environment since the bundle operates in a different shell environment than the one from the terminal, it only has a few default paths set. add the homebrew ARM default install paths to the PATH environment variable, so the bundle can also find the needed binaries like yt-dl. --- osdep/mac/application.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osdep/mac/application.swift b/osdep/mac/application.swift index 23a15023e8..6bc424a654 100644 --- a/osdep/mac/application.swift +++ b/osdep/mac/application.swift @@ -87,7 +87,9 @@ class Application: NSApplication, NSApplicationDelegate { } let path = (ProcessInfo.processInfo.environment["PATH"] ?? "") + - ":/usr/local/bin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin" + ":/usr/local/bin:/usr/local/sbin" + // homebrew Intel + ":/opt/local/bin:/opt/local/sbin" + // MacPorts + ":/opt/homebrew/bin:/opt/homebrew/sbin" // homebrew ARM appHub.log.verbose("Setting Bundle $PATH to: \(path)") _ = path.withCString { setenv("PATH", $0, 1) } }