mirror of
https://github.com/go-task/task.git
synced 2025-04-17 12:06:30 +02:00
16 lines
197 B
Go
16 lines
197 B
Go
package homefix
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/mitchellh/go-homedir"
|
|
)
|
|
|
|
func init() {
|
|
if os.Getenv("HOME") == "" {
|
|
if home, err := homedir.Dir(); err == nil {
|
|
os.Setenv("HOME", home)
|
|
}
|
|
}
|
|
}
|