mirror of
https://github.com/rocky-linux/srpmproc.git
synced 2024-12-04 18:36:26 +00:00
Merge branch 'rocky-linux:main' into main
This commit is contained in:
commit
f4f2a0a9e4
@ -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