Sfoglia il codice sorgente

Throw error if no buildpack is selected

jnfrati 4 anni fa
parent
commit
1b61dfc1c7

+ 4 - 0
dashboard/src/main/home/cluster-dashboard/expanded-chart/BuildSettingsTab.tsx

@@ -79,6 +79,10 @@ const BuildSettingsTab: React.FC<Props> = ({ chart, isPreviousVersion }) => {
       return;
       return;
     }
     }
 
 
+    if (!config.builder.length || !config.buildpacks.length) {
+      throw new Error("You have to select at least one buildpack");
+    }
+
     try {
     try {
       await api.updateBuildConfig<UpdateBuildconfigResponse>(
       await api.updateBuildConfig<UpdateBuildconfigResponse>(
         "<token>",
         "<token>",