mirror of
https://github.com/docker/docs.git
synced 2026-11-05 00:14:17 +03:00
Merge pull request #2306 from ngauthier/fix-host-nil-swarm-options
skip printing swarm info when host options swarm info is nil
This commit is contained in:
@@ -91,7 +91,7 @@ func cmdLs(c CommandLine) error {
|
||||
|
||||
swarmInfo := ""
|
||||
|
||||
if item.SwarmOptions.Discovery != "" {
|
||||
if item.SwarmOptions != nil && item.SwarmOptions.Discovery != "" {
|
||||
swarmInfo = swarmMasters[item.SwarmOptions.Discovery]
|
||||
if item.SwarmOptions.Master {
|
||||
swarmInfo = fmt.Sprintf("%s (master)", swarmInfo)
|
||||
|
||||
Reference in New Issue
Block a user