Parcourir la source

Merge pull request #21377 from LK4D4/fix_compile

runconfig/opts: fix compilation issue
Tibor Vass il y a 9 ans
Parent
commit
c22d09f563
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      runconfig/opts/parse.go

+ 1 - 0
runconfig/opts/parse.go

@@ -242,6 +242,7 @@ func Parse(cmd *flag.FlagSet, args []string) (*container.Config, *container.Host
 		entrypoint = strslice.StrSlice{*flEntrypoint}
 		entrypoint = strslice.StrSlice{*flEntrypoint}
 	}
 	}
 	// Validate if the given hostname is RFC 1123 (https://tools.ietf.org/html/rfc1123) compliant.
 	// Validate if the given hostname is RFC 1123 (https://tools.ietf.org/html/rfc1123) compliant.
+	hostname := *flHostname
 	if hostname != "" {
 	if hostname != "" {
 		matched, _ := regexp.MatchString("^(([[:alnum:]]|[[:alnum:]][[:alnum:]\\-]*[[:alnum:]])\\.)*([[:alnum:]]|[[:alnum:]][[:alnum:]\\-]*[[:alnum:]])$", hostname)
 		matched, _ := regexp.MatchString("^(([[:alnum:]]|[[:alnum:]][[:alnum:]\\-]*[[:alnum:]])\\.)*([[:alnum:]]|[[:alnum:]][[:alnum:]\\-]*[[:alnum:]])$", hostname)
 		if !matched {
 		if !matched {