fix: catch multiple containers correctly
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a170e26e27
commit
cdb76e7276
@ -64,10 +64,10 @@ var appRunCommand = &cli.Command{
|
|||||||
logrus.Fatal(err)
|
logrus.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch len(containers) {
|
if len(containers) == 0 {
|
||||||
case 0:
|
|
||||||
logrus.Fatalf("no containers matching '%s' found?", stackAndServiceName)
|
logrus.Fatalf("no containers matching '%s' found?", stackAndServiceName)
|
||||||
case 1:
|
}
|
||||||
|
if len(containers) > 1 {
|
||||||
logrus.Fatalf("expected 1 container matching '%s' but got %d", stackAndServiceName, len(containers))
|
logrus.Fatalf("expected 1 container matching '%s' but got %d", stackAndServiceName, len(containers))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user