(ctx context.Context)
| 59 | } |
| 60 | |
| 61 | func (a *App) Setup(ctx context.Context) error { |
| 62 | |
| 63 | if utils.IsDockerCmd(a.kind) && isDetachMode(a.logger, a.cmd, a.kind) { |
| 64 | return fmt.Errorf("application could not be started in detached mode") |
| 65 | } |
| 66 | |
| 67 | switch a.kind { |
| 68 | case utils.DockerRun, utils.DockerStart: |
| 69 | err := a.SetupDocker() |
| 70 | if err != nil { |
| 71 | return err |
| 72 | } |
| 73 | case utils.DockerCompose: |
| 74 | extraArgs := agent.StartupAgentHook.GetArgs(ctx) |
| 75 | err := a.SetupCompose(extraArgs) |
| 76 | if err != nil { |
| 77 | return err |
| 78 | } |
| 79 | default: |
| 80 | // setup native binary |
| 81 | } |
| 82 | return nil |
| 83 | } |
| 84 | |
| 85 | func (a *App) SetupDocker() error { |
| 86 |
no test coverage detected