Check ~name parameter for git downloader
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
ee7f4878d1
commit
c8be92c47b
|
@ -39,6 +39,9 @@ func (GitDownloader) Download(opts Options) (Type, string, error) {
|
||||||
rev := query.Get("~rev")
|
rev := query.Get("~rev")
|
||||||
query.Del("~rev")
|
query.Del("~rev")
|
||||||
|
|
||||||
|
name := query.Get("~name")
|
||||||
|
query.Del("~name")
|
||||||
|
|
||||||
depthStr := query.Get("~depth")
|
depthStr := query.Get("~depth")
|
||||||
query.Del("~depth")
|
query.Del("~depth")
|
||||||
|
|
||||||
|
@ -90,7 +93,10 @@ func (GitDownloader) Download(opts Options) (Type, string, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
name := strings.TrimSuffix(path.Base(u.Path), ".git")
|
if name == "" {
|
||||||
|
name = strings.TrimSuffix(path.Base(u.Path), ".git")
|
||||||
|
}
|
||||||
|
|
||||||
return TypeDir, name, nil
|
return TypeDir, name, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue