Skip to content

Commit

Permalink
Merge pull request #15262 from hashicorp/jbardin/extra-logging
Browse files Browse the repository at this point in the history
prevent log output during init
  • Loading branch information
jbardin authored Jun 12, 2017
2 parents be900e8 + c0b1761 commit 00dcf9b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions config_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package main
import (
"bytes"
"errors"
"log"
"os"
"os/exec"
"path/filepath"
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 00dcf9b

Please sign in to comment.