Merge pull request #278 from aluzzardi/flags-homedir-cleanup

flags: Cleanup the homepath() function.
This commit is contained in:
Victor Vieux 2015-01-22 15:08:58 -08:00
commit cb0baf349e
1 changed files with 3 additions and 2 deletions

View File

@ -8,10 +8,11 @@ import (
)
func homepath(p string) string {
home := os.Getenv("HOME")
if runtime.GOOS == "windows" {
return filepath.Join(os.Getenv("USERPROFILE"), p)
home = os.Getenv("USERPROFILE")
}
return filepath.Join(os.Getenv("HOME"), p)
return filepath.Join(home, p)
}
func getDiscovery(c *cli.Context) string {