remove port when creating default workspace path

This commit is contained in:
Brad Rydzewski 2016-06-06 23:38:22 -07:00
parent 108184daeb
commit d01756ed80

View file

@ -2,6 +2,7 @@ package agent
import (
"fmt"
"net"
"net/url"
"path/filepath"
"regexp"
@ -128,6 +129,10 @@ func (a *Agent) prep(w *queue.Work) (*yaml.Config, error) {
src := "src"
if url, _ := url.Parse(w.Repo.Link); url != nil {
host, _, err := net.SplitHostPort(url.Host)
if err == nil {
url.Host = host
}
src = filepath.Join(src, url.Host, url.Path)
}