Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cli/command/service/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,11 @@ func convertNetworks(ctx context.Context, apiClient client.NetworkAPIClient, net
if err != nil {
return nil, err
}
netAttach = append(netAttach, swarm.NetworkAttachmentConfig(net))
netAttach = append(netAttach, swarm.NetworkAttachmentConfig{ // nolint: gosimple
Target: net.Target,
Aliases: net.Aliases,
DriverOpts: net.DriverOpts,
})
}
sort.Sort(byNetworkTarget(netAttach))
return netAttach, nil
Expand Down
5 changes: 2 additions & 3 deletions cli/command/service/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,8 @@ func updatePlacementPreferences(flags *pflag.FlagSet, placement *swarm.Placement
}

if flags.Changed(flagPlacementPrefAdd) {
for _, addition := range flags.Lookup(flagPlacementPrefAdd).Value.(*placementPrefOpts).prefs {
newPrefs = append(newPrefs, addition)
}
newPrefs = append(newPrefs,
flags.Lookup(flagPlacementPrefAdd).Value.(*placementPrefOpts).prefs...)
}

placement.Preferences = newPrefs
Expand Down
2 changes: 1 addition & 1 deletion cli/config/configfile/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (configFile *ConfigFile) ParseProxyConfig(host string, runOpts []string) ma
cfgKey = host
}

config, _ := configFile.Proxies[cfgKey]
config := configFile.Proxies[cfgKey]
permitted := map[string]*string{
"HTTP_PROXY": &config.HTTPProxy,
"HTTPS_PROXY": &config.HTTPSProxy,
Expand Down