mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-30 05:41:12 +00:00
remove port when creating default workspace path
This commit is contained in:
parent
108184daeb
commit
d01756ed80
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue