fix: properly set the command for herokuish apps
This commit is contained in:
@@ -153,7 +153,7 @@ func enterPod(ctx context.Context, input EnterPodInput) error {
|
||||
func extractStartCommand(input StartCommandInput) string {
|
||||
command := ""
|
||||
if input.ImageSourceType == "herokuish" {
|
||||
command = "/start " + input.ProcessType
|
||||
return "/start " + input.ProcessType
|
||||
}
|
||||
|
||||
startCommandResp, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
@@ -162,14 +162,10 @@ func extractStartCommand(input StartCommandInput) string {
|
||||
CaptureOutput: true,
|
||||
StreamStdio: false,
|
||||
})
|
||||
if err == nil && startCommandResp.ExitCode == 0 {
|
||||
if err == nil && startCommandResp.ExitCode == 0 && len(startCommandResp.Stdout) > 0 {
|
||||
command = startCommandResp.Stdout
|
||||
}
|
||||
|
||||
if input.ImageSourceType == "herokuish" {
|
||||
return command
|
||||
}
|
||||
|
||||
if input.ImageSourceType == "dockerfile" {
|
||||
startCommandDockerfileResp, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "config-get",
|
||||
@@ -177,7 +173,7 @@ func extractStartCommand(input StartCommandInput) string {
|
||||
CaptureOutput: true,
|
||||
StreamStdio: false,
|
||||
})
|
||||
if err == nil && startCommandDockerfileResp.ExitCode == 0 {
|
||||
if err == nil && startCommandDockerfileResp.ExitCode == 0 && len(startCommandDockerfileResp.Stdout) > 0 {
|
||||
command = startCommandDockerfileResp.Stdout
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user