()
| 111 | } |
| 112 | |
| 113 | func getContainers() ([]podman.Container, error) { |
| 114 | logrus.Debug("Fetching all containers") |
| 115 | args := []string{"--all", "--sort", "names"} |
| 116 | containers, err := podman.GetContainers(args...) |
| 117 | if err != nil { |
| 118 | logrus.Debugf("Fetching all containers failed: %s", err) |
| 119 | return nil, errors.New("failed to get containers") |
| 120 | } |
| 121 | |
| 122 | var toolboxContainers []podman.Container |
| 123 | |
| 124 | for containers.Next() { |
| 125 | if container := containers.Get(); container.IsToolbx() { |
| 126 | toolboxContainers = append(toolboxContainers, container) |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | return toolboxContainers, nil |
| 131 | } |
| 132 | |
| 133 | func listHelp(cmd *cobra.Command, args []string) { |
| 134 | if utils.IsInsideContainer() { |
no test coverage detected
searching dependent graphs…