File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
lib/cloud_controller/blobstore/storage_cli Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -80,11 +80,15 @@ def validate_required_keys!(json, path)
8080 provider = json [ 'provider' ] . to_s . strip
8181 raise BlobstoreError . new ( "No provider specified in config file: #{ path . inspect } " ) if provider . empty?
8282
83- if provider == 'AzureRM'
84- required = %w[ account_key account_name container_name environment ]
85- elsif provider == 'aliyun'
86- required = %w[ access_key_id access_key_secret endpoint bucket_name ]
87- end
83+ required =
84+ case provider
85+ when 'AzureRM'
86+ %w[ account_key account_name container_name environment ]
87+ when 'aliyun'
88+ %w[ access_key_id access_key_secret endpoint bucket_name ]
89+ else
90+ [ ]
91+ end
8892 missing = required . reject { |k | json . key? ( k ) && !json [ k ] . to_s . strip . empty? }
8993 return if missing . empty?
9094
You can’t perform that action at this time.
0 commit comments