mirror of https://github.com/docker/docs.git
Merge pull request #278 from aluzzardi/flags-homedir-cleanup
flags: Cleanup the homepath() function.
This commit is contained in:
commit
cb0baf349e
5
flags.go
5
flags.go
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue