Skip to content

Commit

Permalink
Include the prefix /opt/homebrew/bin in the PATH for installations th…
Browse files Browse the repository at this point in the history
…at were performed for arch arm64 (#111)
  • Loading branch information
claudiofreitas authored Nov 30, 2023
1 parent 7f0eb17 commit 8b828f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ff2mpv
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ args.push(*options)
# from, say, Firefox. The real fix is to modify `launchd.conf`, but that's
# invasive and maybe not what users want in the general case.
# Hence this nasty hack.
ENV["PATH"] = "/usr/local/bin:#{ENV['PATH']}" if RUBY_PLATFORM =~ /darwin/
ENV["PATH"] = "/usr/local/bin:/opt/homebrew/bin:#{ENV['PATH']}" if RUBY_PLATFORM =~ /darwin/

pid = spawn "mpv", *args, "--", url, in: :close, out: "/dev/null", err: "/dev/null"

Expand Down
2 changes: 1 addition & 1 deletion ff2mpv.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def main():
# Hence this nasty hack.
if platform.system() == "Darwin":
path = os.environ.get("PATH")
os.environ["PATH"] = f"/usr/local/bin:{path}"
os.environ["PATH"] = f"/usr/local/bin:/opt/homebrew/bin:{path}"

subprocess.Popen(args, **kwargs)

Expand Down

0 comments on commit 8b828f9

Please sign in to comment.