|
|
@ -70,10 +70,16 @@ func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string
|
|
|
|
|
|
|
|
|
|
|
|
// Add the registry client based on settings
|
|
|
|
// Add the registry client based on settings
|
|
|
|
// TODO: Move this elsewhere (first, settings.Init() must move)
|
|
|
|
// TODO: Move this elsewhere (first, settings.Init() must move)
|
|
|
|
// TODO: handle errors
|
|
|
|
// TODO: handle errors, dont panic
|
|
|
|
credentialsFile := filepath.Join(settings.Home.Registry(), registry.CredentialsFileBasename)
|
|
|
|
credentialsFile := filepath.Join(settings.Home.Registry(), registry.CredentialsFileBasename)
|
|
|
|
client, _ := auth.NewClient(credentialsFile)
|
|
|
|
client, err := auth.NewClient(credentialsFile)
|
|
|
|
resolver, _ := client.Resolver(context.Background())
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
panic(err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
resolver, err := client.Resolver(context.Background())
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
panic(err)
|
|
|
|
|
|
|
|
}
|
|
|
|
actionConfig.RegistryClient = registry.NewClient(®istry.ClientOptions{
|
|
|
|
actionConfig.RegistryClient = registry.NewClient(®istry.ClientOptions{
|
|
|
|
Out: out,
|
|
|
|
Out: out,
|
|
|
|
Authorizer: registry.Authorizer{
|
|
|
|
Authorizer: registry.Authorizer{
|
|
|
|