瀏覽代碼

Error if v2 porter.yaml specified, but not enabled on the project (#3472)

Stefan McShane 3 年之前
父節點
當前提交
36524f094d
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      cli/cmd/commands/apply.go

+ 2 - 0
cli/cmd/commands/apply.go

@@ -232,6 +232,8 @@ func apply(ctx context.Context, _ *types.GetAuthenticatedUserResponse, client ap
 
 			resGroup.Resources = append(resGroup.Resources, resources...)
 		}
+	} else if previewVersion.Version == "v2" {
+		return errors.New("porter.yaml v2 is not enabled for this project")
 	} else {
 		return fmt.Errorf("unknown porter.yaml version: %s", previewVersion.Version)
 	}