chore: short-circuit procfile command fetching if there is no procfile

This commit is contained in:
Jose Diaz-Gonzalez
2020-11-01 17:42:32 -05:00
parent cae561f7b9
commit a93f504d45

View File

@@ -2,6 +2,7 @@ package ps
import (
"bytes"
"errors"
"fmt"
"os"
"path/filepath"
@@ -101,6 +102,10 @@ func generateScalefile(appName string, destination string) error {
}
func getProcfileCommand(procfilePath string, processType string, port int) (string, error) {
if !common.FileExists(procfilePath) {
return "", errors.New("No procfile found")
}
shellCmd := common.NewShellCmd(strings.Join([]string{
"procfile-util",
"show",