mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-07 14:32:09 +00:00
Export $HOME lookup to pkg/homedir
Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
This commit is contained in:
+2
-2
@@ -14,10 +14,10 @@ import (
|
||||
"text/template"
|
||||
"time"
|
||||
|
||||
"github.com/docker/docker/pkg/homedir"
|
||||
flag "github.com/docker/docker/pkg/mflag"
|
||||
"github.com/docker/docker/pkg/term"
|
||||
"github.com/docker/docker/registry"
|
||||
"github.com/docker/docker/utils"
|
||||
)
|
||||
|
||||
type DockerCli struct {
|
||||
@@ -105,7 +105,7 @@ func (cli *DockerCli) Subcmd(name, signature, description string, exitOnError bo
|
||||
}
|
||||
|
||||
func (cli *DockerCli) LoadConfigFile() (err error) {
|
||||
cli.configFile, err = registry.LoadConfig(utils.GetHomeDir())
|
||||
cli.configFile, err = registry.LoadConfig(homedir.Get())
|
||||
if err != nil {
|
||||
fmt.Fprintf(cli.err, "WARNING: %s\n", err)
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import (
|
||||
"github.com/docker/docker/opts"
|
||||
"github.com/docker/docker/pkg/archive"
|
||||
"github.com/docker/docker/pkg/fileutils"
|
||||
"github.com/docker/docker/pkg/homedir"
|
||||
flag "github.com/docker/docker/pkg/mflag"
|
||||
"github.com/docker/docker/pkg/parsers"
|
||||
"github.com/docker/docker/pkg/parsers/filters"
|
||||
@@ -388,7 +389,7 @@ func (cli *DockerCli) CmdLogin(args ...string) error {
|
||||
var out2 engine.Env
|
||||
err = out2.Decode(stream)
|
||||
if err != nil {
|
||||
cli.configFile, _ = registry.LoadConfig(utils.GetHomeDir())
|
||||
cli.configFile, _ = registry.LoadConfig(homedir.Get())
|
||||
return err
|
||||
}
|
||||
registry.SaveConfig(cli.configFile)
|
||||
|
||||
Reference in New Issue
Block a user