mirror of https://github.com/docker/docs.git
flags: Cleanup the homepath() function.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
9dd96077c3
commit
45dbe6b73f
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