Skip to content

Commit

Permalink
linter comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Feroze Mohideen committed Sep 22, 2023
1 parent f1317d6 commit 43b2c1c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cli/cmd/commands/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ var (

const (
cnb_life_cycle_launcher = "/cnb/lifecycle/launcher"
launcher = "launcher"
)

func registerCommand_App(cliConf config.CLIConfig) *cobra.Command {
Expand Down Expand Up @@ -461,7 +462,7 @@ func appGetPodsV1PorterYaml(ctx context.Context, cliConfig config.CLIConfig, cli
var containerHasLauncherStartCommand bool

for _, container := range pods[0].Spec.Containers {
if len(container.Command) > 0 && (container.Command[0] == "launcher" || container.Command[0] == cnb_life_cycle_launcher) {
if len(container.Command) > 0 && (container.Command[0] == launcher || container.Command[0] == cnb_life_cycle_launcher) {
containerHasLauncherStartCommand = true
}
}
Expand Down Expand Up @@ -519,7 +520,7 @@ func appGetPodsV2PorterYaml(ctx context.Context, cliConfig config.CLIConfig, cli
var containerHasLauncherStartCommand bool

for _, container := range pods[0].Spec.Containers {
if len(container.Command) > 0 && (container.Command[0] == "launcher" || container.Command[0] == cnb_life_cycle_launcher) {
if len(container.Command) > 0 && (container.Command[0] == launcher || container.Command[0] == cnb_life_cycle_launcher) {
containerHasLauncherStartCommand = true
}
}
Expand Down Expand Up @@ -1188,7 +1189,7 @@ func getPodsFromV1PorterYaml(ctx context.Context, execArgs []string, client api.
return nil, nil, fmt.Errorf("could not retrieve list of pods: %s", err.Error())
}

if len(execArgs) > 0 && execArgs[0] != cnb_life_cycle_launcher && execArgs[0] != "launcher" && containerHasLauncherStartCommand {
if len(execArgs) > 0 && execArgs[0] != cnb_life_cycle_launcher && execArgs[0] != launcher && containerHasLauncherStartCommand {
execArgs = append([]string{cnb_life_cycle_launcher}, execArgs...)
}

Expand Down

0 comments on commit 43b2c1c

Please sign in to comment.