diff --git a/os.go b/os.go index 3dd9b1f9..0b9a61fd 100644 --- a/os.go +++ b/os.go @@ -66,10 +66,14 @@ func init() { if err != nil { log.Printf("user: %s", err) if os.Getenv("HOME") == "" { - log.Print("$HOME variable is empty or not set") + panic("$HOME variable is empty or not set") } if os.Getenv("USER") == "" { - log.Print("$USER variable is empty or not set") + panic("$USER variable is empty or not set") + } + u = &user.User{ + Username: os.Getenv("USER"), + HomeDir: os.Getenv("HOME"), } } gUser = u