From cbac7a30637fc35e09dcd4530dfa105c52db0119 Mon Sep 17 00:00:00 2001 From: Adrian Ho Date: Thu, 17 Feb 2022 11:55:04 +0800 Subject: [PATCH] brew: keep DBus session address in env Otherwise `brew deps --graph` will fail to launch Firefox on Linux. Fixes https://github.com/Homebrew/brew/issues/12881. --- Library/Homebrew/utils.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index efa4abe7fa..4a9017262f 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -372,7 +372,9 @@ module Kernel ENV["DISPLAY"] = Homebrew::EnvConfig.display - safe_system(browser, *args) + with_env(DBUS_SESSION_BUS_ADDRESS: ENV["HOMEBREW_DBUS_SESSION_BUS_ADDRESS"]) do + safe_system(browser, *args) + end end # GZips the given paths, and returns the gzipped paths.