Skip to content

Commit

Permalink
fix: #53 fix task container selection
Browse files Browse the repository at this point in the history
  • Loading branch information
tedsmitt committed Oct 15, 2024
1 parent c77b207 commit c29e18f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions internal/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,9 @@ func (e *App) getContainer() {
cliArg := viper.GetString("container")
if cliArg != "" {
for _, c := range e.task.Containers {
if *c.Name == cliArg {
e.container = &c
container := c
if *container.Name == cliArg {
e.container = &container
e.input <- "execute"
return
}
Expand Down
5 changes: 3 additions & 2 deletions internal/select.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,9 @@ func selectContainer(containers *[]ecsTypes.Container) (*ecsTypes.Container, err

var container *ecsTypes.Container
for _, c := range *containers {
if selection == *c.Name {
container = &c
cont := c
if selection == *cont.Name {
container = &cont
}
}

Expand Down

0 comments on commit c29e18f

Please sign in to comment.