From c0b17610965450a89598da491ce9b6b5cbd6393f Mon Sep 17 00:00:00 2001 From: James Bardin Date: Mon, 12 Jun 2017 15:04:40 -0400 Subject: [PATCH] prevent log output during init The extra output shouldn't be seen by the user, and is causing TFE to fail. --- config_unix.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config_unix.go b/config_unix.go index 4694d5114..d28d74924 100644 --- a/config_unix.go +++ b/config_unix.go @@ -5,7 +5,6 @@ package main import ( "bytes" "errors" - "log" "os" "os/exec" "path/filepath" @@ -33,7 +32,12 @@ func configDir() (string, error) { func homeDir() (string, error) { // First prefer the HOME environmental variable if home := os.Getenv("HOME"); home != "" { - log.Printf("[DEBUG] Detected home directory from env var: %s", home) + + // FIXME: homeDir gets called from globalPluginDirs during init, before + // the logging is setup. We should move meta initializtion outside of + // init, but in the meantime we just need to silence this output. + //log.Printf("[DEBUG] Detected home directory from env var: %s", home) + return home, nil }