Explorar o código

Fix profile load: upper path variable is shadowed by := operator.

Eli %!s(int64=6) %!d(string=hai) anos
pai
achega
d7f4766a04
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      sdk/auth/credentials/provider/profile_credentials.go

+ 2 - 1
sdk/auth/credentials/provider/profile_credentials.go

@@ -40,7 +40,8 @@ func NewProfileProvider(name ...string) Provider {
 func (p *ProfileProvider) Resolve() (auth.Credential, error) {
 	path, ok := os.LookupEnv(ENVCredentialFile)
 	if !ok {
-		path, err := checkDefaultPath()
+		var err error
+		path, err = checkDefaultPath()
 		if err != nil {
 			return nil, err
 		}