History

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.

der richter committed 2 years ago

Commit d6aef541 parent 9a1c6371 file · +3 −1Browse files

Unified · Split

osdep/mac/application.swift+3−1
@@ -87,7 +87,9 @@ class Application: NSApplication, NSApplicationDelegate { · 86 unmodified lines
8787 }
8888
8989 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
9193 appHub.log.verbose("Setting Bundle $PATH to: \(path)")
9294 _ = path.withCString { setenv("PATH", $0, 1) }
9395 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t