소스 검색

Skip unsupported provisioners.

Mariano Cano 7 년 전
부모
커밋
9200f11ed8
1개의 변경된 파일과 5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      authority/provisioner/provisioner.go

+ 5 - 1
authority/provisioner/provisioner.go

@@ -150,7 +150,11 @@ func (l *List) UnmarshalJSON(data []byte) error {
 		case "azure":
 		case "azure":
 			p = &Azure{}
 			p = &Azure{}
 		default:
 		default:
-			return errors.Errorf("provisioner type %s not supported", typ.Type)
+			// Skip unsupported files. When this method is specially used on
+			// clients, these might be compiled with a version that does not
+			// support a specific provisioner type, if we don't skip it we will
+			// force to re-compile the client to make it compatible.
+			continue
 		}
 		}
 		if err := json.Unmarshal(data, p); err != nil {
 		if err := json.Unmarshal(data, p); err != nil {
 			return errors.Errorf("error unmarshaling provisioner")
 			return errors.Errorf("error unmarshaling provisioner")