mirror of
https://github.com/rocky-linux/srpmproc.git
synced 2024-12-04 18:36:26 +00:00
Fix Default cdn behavior (#9)
- CDN returned as-is for processing if no template indicators are found -Skip G.
This commit is contained in:
parent
2c6d6f0b0a
commit
5e8ed2e521
@ -498,6 +498,11 @@ func (g *GitMode) ImportName(pd *data.ProcessData, md *data.ModeData) string {
|
||||
func ProcessUrl(cdnUrl string, name string, branch string, hash string, hashtype string, filename string) (string, bool) {
|
||||
tmpUrl := Lookaside{name, branch, hash, hashtype, filename}
|
||||
|
||||
// Return cdnUrl as-is if we don't have any templates ("{{ .Variable }}") to process:
|
||||
if !(strings.Contains(cdnUrl, "{{") && strings.Contains(cdnUrl, "}}")) {
|
||||
return cdnUrl, false
|
||||
}
|
||||
|
||||
// If we run into trouble with our template parsing, we'll just return the cdnUrl, exactly as we found it
|
||||
tmpl, err := template.New("").Parse(cdnUrl)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user