fix: load config file

This commit is contained in:
Ludovic Ortega 2023-11-12 21:01:53 +01:00
parent 811b425672
commit bf3065e726
No known key found for this signature in database
GPG Key ID: 87471466EB186A4C

View File

@ -65,7 +65,13 @@ func NewScalewayProvider(ctx context.Context, domainFilter endpoint.DomainFilter
defaultPageSize = 1000 defaultPageSize = 1000
} }
} }
p, _ := scw.LoadConfig().GetActiveProfile()
p := &scw.Profile{}
c, err := scw.LoadConfig()
if err == nil {
p, _ = c.GetActiveProfile()
}
scwClient, err := scw.NewClient( scwClient, err := scw.NewClient(
scw.WithProfile(p), scw.WithProfile(p),
scw.WithEnv(), scw.WithEnv(),