check HOME and USER variables on startup

Related #108
This commit is contained in:
Gokcehan committed 2018-08-27 19:38:08 +03:00
1 parent 266a583adb
commit 5e67147204
1 file changed
+6
+6
View File
@@ -56,6 +56,12 @@ func init() {
u, err := user.Current()
if err != nil {
log.Printf("user: %s", err)
if os.Getenv("HOME") == "" {
log.Print("$HOME variable is empty or not set")
}
if os.Getenv("USER") == "" {
log.Print("$USER variable is empty or not set")
}
}
gUser = u