瀏覽代碼

only validate v1 porter.yaml when PORTER_VALIDATE_YAML is set

Mohammed Nafees 3 年之前
父節點
當前提交
779996490e
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      cli/cmd/apply.go

+ 5 - 3
cli/cmd/apply.go

@@ -101,10 +101,12 @@ func init() {
 }
 
 func apply(_ *types.GetAuthenticatedUserResponse, client *api.Client, _ []string) error {
-	err := applyValidate()
+	if _, ok := os.LookupEnv("PORTER_VALIDATE_YAML"); ok {
+		err := applyValidate()
 
-	if err != nil {
-		return err
+		if err != nil {
+			return err
+		}
 	}
 
 	fileBytes, err := ioutil.ReadFile(porterYAML)