mirror of
https://github.com/docker/compose.git
synced 2026-02-09 01:59:22 +08:00
cmd/compose: fix minor linting issues
- inline variable that shadowed package-type - don't use apiBuildOptions if an error was returned Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
committed by
Nicolas De loof
parent
713de5bb9e
commit
4a4776ec57
@@ -160,10 +160,10 @@ func runBuild(ctx context.Context, dockerCli command.Cli, backend api.Service, o
|
||||
}
|
||||
|
||||
apiBuildOptions, err := opts.toAPIBuildOptions(services)
|
||||
apiBuildOptions.Attestations = true
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
apiBuildOptions.Attestations = true
|
||||
|
||||
return backend.Build(ctx, project, apiBuildOptions)
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ func runCommit(ctx context.Context, dockerCli command.Cli, backend api.Service,
|
||||
return err
|
||||
}
|
||||
|
||||
commitOptions := api.CommitOptions{
|
||||
return backend.Commit(ctx, projectName, api.CommitOptions{
|
||||
Service: options.service,
|
||||
Reference: options.reference,
|
||||
Pause: options.pause,
|
||||
@@ -87,7 +87,5 @@ func runCommit(ctx context.Context, dockerCli command.Cli, backend api.Service,
|
||||
Author: options.author,
|
||||
Changes: options.changes,
|
||||
Index: options.index,
|
||||
}
|
||||
|
||||
return backend.Commit(ctx, projectName, commitOptions)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user