From 1e94c2964d517ca4840ff5fa7ae1fd76753642de Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 24 Feb 2020 21:52:38 +0100 Subject: build: move initialization after SetXdgDirs otherwise it triggers the config file initialization from vendor/github.com/containers/common/pkg/config before the init() in main.go can set correctly XDG_RUNTIME_DIR and DBUS_SESSION_BUS_ADDRESS when they are missing. commit 96de762eedd1470dfbe73cf424eea848589268d7 introduced the regression. Closes: https://github.com/containers/libpod/issues/5314 Signed-off-by: Giuseppe Scrivano --- cmd/podman/build.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cmd/podman/build.go') diff --git a/cmd/podman/build.go b/cmd/podman/build.go index 12aedac37..fa4689211 100644 --- a/cmd/podman/build.go +++ b/cmd/podman/build.go @@ -53,13 +53,12 @@ var ( } ) -func init() { +func initBuild() { buildCommand.Command = _buildCommand buildCommand.SetHelpTemplate(HelpTemplate()) buildCommand.SetUsageTemplate(UsageTemplate()) flags := buildCommand.Flags() flags.SetInterspersed(true) - budFlags := buildahcli.GetBudFlags(&budFlagsValues) flag := budFlags.Lookup("pull") if err := flag.Value.Set("true"); err != nil { -- cgit v1.2.3-54-g00ecf