refactor: fix auth error handling (#7615)

Signed-off-by: knqyf263 <knqyf263@gmail.com>
This commit is contained in:
Teppei Fukuda
2024-09-30 15:22:59 +04:00
committed by GitHub
parent cb16d43b69
commit 9d1be410c4
9 changed files with 33 additions and 73 deletions

View File

@@ -57,7 +57,7 @@ type Artifact struct {
}
// NewArtifact returns a new artifact
func NewArtifact(repo string, quiet bool, registryOpt types.RegistryOptions, opts ...Option) (*Artifact, error) {
func NewArtifact(repo string, quiet bool, registryOpt types.RegistryOptions, opts ...Option) *Artifact {
art := &Artifact{
repository: repo,
quiet: quiet,
@@ -67,7 +67,7 @@ func NewArtifact(repo string, quiet bool, registryOpt types.RegistryOptions, opt
for _, o := range opts {
o(art)
}
return art, nil
return art
}
func (a *Artifact) populate(ctx context.Context, opt types.RegistryOptions) error {