@@ -232,10 +232,8 @@ func build(
232232 log .Debug ("Done" )
233233
234234 procType := pkg.ProcessType {}
235- if bType == buildTypeProcfile {
236- if procType , err = getProcFile (storageDriver , tmpDir , slugBuilderInfo .AbsoluteProcfileKey ()); err != nil {
237- return err
238- }
235+ if procType , err = getProcFile (storageDriver , tmpDir , slugBuilderInfo .AbsoluteProcfileKey (), bType ); err != nil {
236+ return err
239237 }
240238
241239 log .Info ("Build complete." )
@@ -275,7 +273,7 @@ func prettyPrintJSON(data interface{}) (string, error) {
275273 return string (formatted .Bytes ()), nil
276274}
277275
278- func getProcFile (getter storage.ObjectGetter , dirName , procfileKey string ) (pkg.ProcessType , error ) {
276+ func getProcFile (getter storage.ObjectGetter , dirName , procfileKey string , bType buildType ) (pkg.ProcessType , error ) {
279277 procType := pkg.ProcessType {}
280278 if _ , err := os .Stat (fmt .Sprintf ("%s/Procfile" , dirName )); err == nil {
281279 rawProcFile , err := ioutil .ReadFile (fmt .Sprintf ("%s/Procfile" , dirName ))
@@ -287,6 +285,9 @@ func getProcFile(getter storage.ObjectGetter, dirName, procfileKey string) (pkg.
287285 }
288286 return procType , nil
289287 }
288+ if bType != buildTypeProcfile {
289+ return procType , nil
290+ }
290291 log .Debug ("Procfile not present. Getting it from the buildpack" )
291292 rawProcFile , err := getter .GetContent (context .Background (), procfileKey )
292293 if err != nil {
0 commit comments