forked from toolshed/abra
refactor: moved all fatal errors to logrus
This will allow us to test commands that would normally exit
This commit is contained in:
@ -101,7 +101,7 @@ var appPsCommand = &cli.Command{
|
||||
cl := client.NewClientWithContext(Context)
|
||||
tasks, err := cl.TaskList(ctx, types.TaskListOptions{})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
for _, task := range tasks {
|
||||
resolver := idresolver.New(cl, false)
|
||||
@ -113,7 +113,7 @@ var appPsCommand = &cli.Command{
|
||||
}
|
||||
containers, err := cl.ContainerList(ctx, types.ContainerListOptions{})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
table := createTable([]string{"ID", "Image", "Command", "Created", "Status", "Ports", "Names"})
|
||||
var conTable [][]string
|
||||
@ -166,7 +166,7 @@ var appSecretCommand = &cli.Command{
|
||||
passgen.WordListDefault,
|
||||
)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
for _, password := range passwords {
|
||||
|
Reference in New Issue
Block a user