mirror of https://github.com/docker/docs.git
Fix homedir for Windows.
Signed-off-by: Jeff Mendoza <jeffmendoza@live.com>
This commit is contained in:
parent
c4366fb0a5
commit
50e5b2501a
|
|
@ -4,10 +4,16 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
homedir "github.com/mitchellh/go-homedir"
|
||||
)
|
||||
|
||||
func PublicKeyPath() string {
|
||||
return filepath.Join(os.Getenv("HOME"), ".docker/public-key.json")
|
||||
homeDir, err := homedir.Dir()
|
||||
if err != nil {
|
||||
homeDir = ""
|
||||
}
|
||||
return filepath.Join(homeDir, ".docker/public-key.json")
|
||||
}
|
||||
|
||||
func AddPublicKeyToAuthorizedHosts(d Driver, authorizedKeysPath string) error {
|
||||
|
|
|
|||
Loading…
Reference in New Issue