We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ffaada commit df18be8Copy full SHA for df18be8
cmd/tailfincmd/cmd.go
@@ -113,7 +113,6 @@ func (o *options) Complete(args []string) error {
113
}
114
115
var err error
116
- // TODO More error handling here. err == nil even if no daemon is found
117
o.dockerClient, err = dockerclient.NewClientWithOpts(dockerclient.FromEnv, dockerclient.WithAPIVersionNegotiation())
118
if err != nil {
119
panic(err)
@@ -143,6 +142,11 @@ func (o *options) Run(cmd *cobra.Command) error {
143
142
ctx, cancel := context.WithCancel(context.Background())
144
defer cancel()
145
+ _, err = o.dockerClient.Ping(ctx)
146
+ if err != nil {
147
+ return err
148
+ }
149
+
150
return stern.RunDocker(ctx, o.dockerClient, config)
151
152
0 commit comments