Merge pull request #15262 from hashicorp/jbardin/extra-logging

prevent log output during init
This commit is contained in:
James Bardin 2017-06-12 15:15:00 -04:00 committed by GitHub
commit 00dcf9baac
1 changed files with 6 additions and 2 deletions

View File

@ -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
}