refactor: drop the last argument from procfile-get-command

No external plugin should need to know the internals of where processes are.
This commit is contained in:
Jose Diaz-Gonzalez
2020-11-01 17:30:24 -05:00
parent e8cfbfad36
commit ab1d15216c
5 changed files with 7 additions and 9 deletions

View File

@@ -62,7 +62,7 @@ func main() {
processType := flag.Arg(1)
port := common.ToInt(flag.Arg(2), 5000)
procfilePath := flag.Arg(3)
err = ps.TriggerProcfileGetCommand(appName, processType, port, procfilePath)
err = ps.TriggerProcfileGetCommand(appName, processType, port)
case "procfile-remove":
appName := flag.Arg(0)
procfilePath := flag.Arg(1)

View File

@@ -162,11 +162,8 @@ func TriggerProcfileExtract(appName string, image string, forceExtract bool, pro
return extractProcfile(appName, image, procfilePath)
}
func TriggerProcfileGetCommand(appName string, processType string, port int, procfilePath string) error {
if procfilePath == "" {
procfilePath = getProcfilePath(appName)
}
func TriggerProcfileGetCommand(appName string, processType string, port int) error {
procfilePath := getProcfilePath(appName)
command, err := getProcfileCommand(procfilePath, processType, port)
if err != nil {
return err