Skip to content

Commit

Permalink
use correct var for container name
Browse files Browse the repository at this point in the history
  • Loading branch information
karimra committed Jul 27, 2021
1 parent 880b6ea commit 436aee7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ var execCmd = &cobra.Command{
if cont.State != "running" {
continue
}

nodeRuntime, err := c.GetNodeRuntime(cntName)
if len(cont.Names) == 0 {
continue
}
nodeRuntime, err := c.GetNodeRuntime(strings.TrimPrefix(cont.Names[0], "/"))
if err != nil {
return err
}
Expand Down

0 comments on commit 436aee7

Please sign in to comment.