Skip to content

Commit 71fe85d

Browse files
committed
Try to fix mysterious test failures on Travis
1 parent 01ec44a commit 71fe85d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commands/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ func fixUrl(s string) (string, error) {
146146
if !strings.HasPrefix(s, "http://") && !strings.HasPrefix(s, "https://") {
147147
s = "http://" + s
148148
}
149-
if !strings.HasSuffix(s, "/") {
149+
if len(s) > 0 && !strings.HasSuffix(s, "/") {
150150
s = s + "/"
151151
}
152152
u, err := url.Parse(s)

0 commit comments

Comments
 (0)