Skip to content

Commit ea67178

Browse files
montj2anthonyfok
authored andcommitted
Fix empty host var before slicing
1 parent eb8914d commit ea67178

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

make.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ func shortHostName(gopkg string, allowUnknownHoster bool) (host string, err erro
549549
default:
550550
if allowUnknownHoster {
551551
suffix, _ := publicsuffix.PublicSuffix(host)
552-
host = host[:len(host)-len(suffix)-len(".")]
552+
host = fqdn[:len(fqdn)-len(suffix)-len(".")]
553553
log.Printf("WARNING: Using %q as canonical hostname for %q. If that is not okay, please file a bug against %s.\n", host, fqdn, os.Args[0])
554554
} else {
555555
err = fmt.Errorf("unknown hoster %q", fqdn)

0 commit comments

Comments
 (0)