mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-29 12:01:07 -08:00
fix(docker): only check the DOCKER_CONFIG path when relevant
relates to #3549
This commit is contained in:
parent
7b2e2ff5d2
commit
8d92c87e05
|
@ -33,10 +33,16 @@ func (d *Docker) envVars() []string {
|
|||
}
|
||||
|
||||
func (d *Docker) configFiles() []string {
|
||||
return []string{
|
||||
filepath.Join(d.env.Home(), "/.docker/config.json"),
|
||||
filepath.Join(d.env.Getenv("DOCKER_CONFIG"), "/config.json"),
|
||||
files := []string{
|
||||
filepath.Join(d.env.Home(), ".docker/config.json"),
|
||||
}
|
||||
|
||||
dockerConfig := d.env.Getenv("DOCKER_CONFIG")
|
||||
if len(dockerConfig) > 0 {
|
||||
files = append(files, filepath.Join(dockerConfig, "config.json"))
|
||||
}
|
||||
|
||||
return files
|
||||
}
|
||||
|
||||
func (d *Docker) Enabled() bool {
|
||||
|
|
Loading…
Reference in a new issue