Skip to content

Commit b1f753a

Browse files
authored
Merge pull request #1030 from cartermckinnon/misleading-log
ecr-credential-provider: Fix warning about no region in image ref
2 parents c9d7595 + 3efcee2 commit b1f753a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/ecr-credential-provider/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ func defaultECRProvider(ctx context.Context, region string) (ECR, error) {
6363
var cfg aws.Config
6464
var err error
6565
if region != "" {
66-
klog.Warningf("No region found in the image reference, the default region will be used. Please refer to AWS SDK documentation for configuration purpose.")
6766
cfg, err = config.LoadDefaultConfig(ctx,
6867
config.WithRegion(region),
6968
)
7069
} else {
70+
klog.Warningf("No region found in the image reference, the default region will be used. Please refer to AWS SDK documentation for configuration purpose.")
7171
cfg, err = config.LoadDefaultConfig(ctx)
7272
}
7373

0 commit comments

Comments
 (0)