Przeglądaj źródła

stop dockerfile detection if app exists (#3676)

Co-authored-by: Feroze Mohideen <feroze@porter.run>
ianedwards 2 lat temu
rodzic
commit
095ec3e8c0

+ 3 - 2
dashboard/src/main/home/app-dashboard/create-app/RepoSettings.tsx

@@ -74,7 +74,7 @@ const RepoSettings: React.FC<Props> = ({
   );
 
   useEffect(() => {
-    if (!branchContents) {
+    if (!branchContents || appExists) {
       return;
     }
 
@@ -85,7 +85,7 @@ const RepoSettings: React.FC<Props> = ({
     if (!hasDockerfile) {
       setValue("app.build.buildpacks", []);
     }
-  }, [branchContents]);
+  }, [branchContents, appExists]);
 
   return (
     <div>
@@ -266,6 +266,7 @@ const RepoSettings: React.FC<Props> = ({
                         projectId={projectId}
                         build={b}
                         source={source}
+                        autoDetectionDisabled={appExists}
                       />
                     ))
                     .exhaustive()}