skip lookup for paths starting with ../
Prevent an extra registry lookup for sources starting with ../
This commit is contained in:
parent
402f321abe
commit
6088270c66
|
@ -92,8 +92,8 @@ var detectors = []getter.Detector{
|
||||||
}
|
}
|
||||||
|
|
||||||
// these prefixes can't be registry IDs
|
// these prefixes can't be registry IDs
|
||||||
// "http", "./", "/", "getter::"
|
// "http", "../", "./", "/", "getter::", etc
|
||||||
var skipRegistry = regexp.MustCompile(`^(http|\./|/|[A-Za-z0-9]+::)`).MatchString
|
var skipRegistry = regexp.MustCompile(`^(http|[.]{1,2}/|/|[A-Za-z0-9]+::)`).MatchString
|
||||||
|
|
||||||
// registryDetector implements getter.Detector to detect Terraform Registry modules.
|
// registryDetector implements getter.Detector to detect Terraform Registry modules.
|
||||||
// If a path looks like a registry module identifier, attempt to locate it in
|
// If a path looks like a registry module identifier, attempt to locate it in
|
||||||
|
|
Loading…
Reference in New Issue