mirror of
https://github.com/docker/compose.git
synced 2025-07-22 21:24:38 +02:00
Removes redundant condition from toAPIBuildOptions in build.go
Signed-off-by: Mayank Kapur <kapurm17@gmail.com>
This commit is contained in:
parent
1601ead7bc
commit
69384a9a0f
@ -48,7 +48,6 @@ type buildOptions struct {
|
|||||||
|
|
||||||
func (opts buildOptions) toAPIBuildOptions(services []string) (api.BuildOptions, error) {
|
func (opts buildOptions) toAPIBuildOptions(services []string) (api.BuildOptions, error) {
|
||||||
var SSHKeys []types.SSHKey
|
var SSHKeys []types.SSHKey
|
||||||
var err error
|
|
||||||
if opts.ssh != "" {
|
if opts.ssh != "" {
|
||||||
id, path, found := strings.Cut(opts.ssh, "=")
|
id, path, found := strings.Cut(opts.ssh, "=")
|
||||||
if !found && id != "default" {
|
if !found && id != "default" {
|
||||||
@ -58,9 +57,6 @@ func (opts buildOptions) toAPIBuildOptions(services []string) (api.BuildOptions,
|
|||||||
ID: id,
|
ID: id,
|
||||||
Path: path,
|
Path: path,
|
||||||
})
|
})
|
||||||
if err != nil {
|
|
||||||
return api.BuildOptions{}, err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
builderName := opts.builder
|
builderName := opts.builder
|
||||||
if builderName == "" {
|
if builderName == "" {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user