From 8b828f97a7da09c0555ee6c8cb0a95c54c95c728 Mon Sep 17 00:00:00 2001 From: Claudio Freitas Date: Fri, 1 Dec 2023 06:47:07 +0900 Subject: [PATCH] Include the prefix /opt/homebrew/bin in the PATH for installations that were performed for arch arm64 (#111) --- ff2mpv | 2 +- ff2mpv.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ff2mpv b/ff2mpv index 2acf49c..fd10d56 100755 --- a/ff2mpv +++ b/ff2mpv @@ -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" diff --git a/ff2mpv.py b/ff2mpv.py index 8fbde1e..01a0353 100755 --- a/ff2mpv.py +++ b/ff2mpv.py @@ -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)