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.
Unified · Split
| @@ -87,7 +87,9 @@ class Application: NSApplication, NSApplicationDelegate { · 86 unmodified lines | ||
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | let path = (ProcessInfo.processInfo.environment["PATH"] ?? "") + |
| 90 | − ":/usr/local/bin:/usr/local/sbin:/opt/local/bin:/opt/local/sbin" | |
| 90 | + ":/usr/local/bin:/usr/local/sbin" + // homebrew Intel | |
| 91 | + ":/opt/local/bin:/opt/local/sbin" + // MacPorts | |
| 92 | + ":/opt/homebrew/bin:/opt/homebrew/sbin" // homebrew ARM | |
| 91 | 93 | appHub.log.verbose("Setting Bundle $PATH to: \(path)") |
| 92 | 94 | _ = path.withCString { setenv("PATH", $0, 1) } |
| 93 | 95 | } |