mirror of
https://github.com/docker/docs.git
synced 2026-04-04 02:08:57 +07:00
Merge pull request #278 from aluzzardi/flags-homedir-cleanup
flags: Cleanup the homepath() function.
This commit is contained in:
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 {
|
||||
|
||||
Reference in New Issue
Block a user