chore: short-circuit procfile command fetching if there is no procfile
This commit is contained in:
@@ -2,6 +2,7 @@ package ps
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@@ -101,6 +102,10 @@ func generateScalefile(appName string, destination string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getProcfileCommand(procfilePath string, processType string, port int) (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{
|
shellCmd := common.NewShellCmd(strings.Join([]string{
|
||||||
"procfile-util",
|
"procfile-util",
|
||||||
"show",
|
"show",
|
||||||
|
|||||||
Reference in New Issue
Block a user