From 6088270c6617b64cbdaa39a54b7a26380f91b6fa Mon Sep 17 00:00:00 2001 From: James Bardin Date: Tue, 17 Oct 2017 16:40:51 -0400 Subject: [PATCH] skip lookup for paths starting with ../ Prevent an extra registry lookup for sources starting with ../ --- config/module/get.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/module/get.go b/config/module/get.go index c62b7d2ee..8d32d154e 100644 --- a/config/module/get.go +++ b/config/module/get.go @@ -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