check HOME and USER variables on startup

Related #108
This commit is contained in:
Gokcehan 2018-08-27 19:36:40 +03:00
parent 266a583adb
commit 5e67147204

6
os.go
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