mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
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
|
||||
// "http", "./", "/", "getter::"
|
||||
var skipRegistry = regexp.MustCompile(`^(http|\./|/|[A-Za-z0-9]+::)`).MatchString
|
||||
// "http", "../", "./", "/", "getter::", etc
|
||||
var skipRegistry = regexp.MustCompile(`^(http|[.]{1,2}/|/|[A-Za-z0-9]+::)`).MatchString
|
||||
|
||||
// registryDetector implements getter.Detector to detect Terraform Registry modules.
|
||||
// If a path looks like a registry module identifier, attempt to locate it in
|
||||
|
Loading…
Reference in New Issue
Block a user