Skip to content

Commit

Permalink
Merge pull request #6892 from reasonerjt/cp-6768-1.12
Browse files Browse the repository at this point in the history
[Cherry-pick v1.12] code clean for repository (#6768)
  • Loading branch information
ywk253100 authored Sep 28, 2023
2 parents e4c2b2b + 27a89df commit 2cd15f1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/repository/backup_repo_op.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ func NewBackupRepository(namespace string, key BackupRepositoryKey) *velerov1api
}

func isBackupRepositoryNotFoundError(err error) bool {
return (err == errBackupRepoNotFound)
return err == errBackupRepoNotFound
}

func isBackupRepositoryNotProvisionedError(err error) bool {
return (err == errBackupRepoNotProvisioned)
return err == errBackupRepoNotProvisioned
}
2 changes: 1 addition & 1 deletion pkg/repository/config/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func GetS3Credentials(config map[string]string) (*credentials.Value, error) {
opts := session.Options{}
credentialsFile := config[CredentialsFileKey]
if credentialsFile == "" {
credentialsFile = os.Getenv("AWS_SHARED_CREDENTIALS_FILE")
credentialsFile = os.Getenv(awsCredentialsFileEnvVar)
}
if credentialsFile != "" {
opts.SharedConfigFiles = append(opts.SharedConfigFiles, credentialsFile)
Expand Down
2 changes: 1 addition & 1 deletion pkg/repository/config/gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ func GetGCPCredentials(config map[string]string) string {
if credentialsFile, ok := config[CredentialsFileKey]; ok {
return credentialsFile
}
return os.Getenv("GOOGLE_APPLICATION_CREDENTIALS")
return os.Getenv(gcpCredentialsFileEnvVar)
}

0 comments on commit 2cd15f1

Please sign in to comment.