Skip to content

Commit 0b7c72c

Browse files
committed
cli/command/container: RunStart: inline variable
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 4f67ff8 commit 0b7c72c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

cli/command/container/start.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,13 @@ func RunStart(dockerCli command.Cli, opts *StartOptions) error {
146146
// 3. We should open a channel for receiving status code of the container
147147
// no matter it's detached, removed on daemon side(--rm) or exit normally.
148148
statusChan := waitExitOrRemoved(ctx, dockerCli, c.ID, c.HostConfig.AutoRemove)
149-
startOptions := types.ContainerStartOptions{
150-
CheckpointID: opts.Checkpoint,
151-
CheckpointDir: opts.CheckpointDir,
152-
}
153149

154150
// 4. Start the container.
155-
if err := dockerCli.Client().ContainerStart(ctx, c.ID, startOptions); err != nil {
151+
err = dockerCli.Client().ContainerStart(ctx, c.ID, types.ContainerStartOptions{
152+
CheckpointID: opts.Checkpoint,
153+
CheckpointDir: opts.CheckpointDir,
154+
})
155+
if err != nil {
156156
cancelFun()
157157
<-cErr
158158
if c.HostConfig.AutoRemove {

0 commit comments

Comments
 (0)