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