Skip to content

Commit

Permalink
connection.ActiveConfig() should use config.Active() instead of readi…
Browse files Browse the repository at this point in the history
…ng configuration directly
  • Loading branch information
timburks committed Oct 13, 2023
1 parent f805290 commit 1e05c6a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkg/connection/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,17 @@ func ActiveConfig() (Config, error) {
return *active, nil
}

name, err := config.ActiveName()
c, err := config.Active()
if err != nil {
return Config{}, err
}

return ReadConfig(name)
return Config{
Address: c.Registry.Address,
Insecure: c.Registry.Insecure,
Location: c.Registry.Location,
Project: c.Registry.Project,
Token: c.Registry.Token,
}, nil
}

// Reads a Config from a file. If name is empty, no
Expand Down

0 comments on commit 1e05c6a

Please sign in to comment.