aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/go-getter/detect.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/go-getter/detect.go')
-rw-r--r--vendor/github.com/hashicorp/go-getter/detect.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/go-getter/detect.go b/vendor/github.com/hashicorp/go-getter/detect.go
index 481b737..c369551 100644
--- a/vendor/github.com/hashicorp/go-getter/detect.go
+++ b/vendor/github.com/hashicorp/go-getter/detect.go
@@ -72,12 +72,18 @@ func Detect(src string, pwd string, ds []Detector) (string, error) {
72 subDir = detectSubdir 72 subDir = detectSubdir
73 } 73 }
74 } 74 }
75
75 if subDir != "" { 76 if subDir != "" {
76 u, err := url.Parse(result) 77 u, err := url.Parse(result)
77 if err != nil { 78 if err != nil {
78 return "", fmt.Errorf("Error parsing URL: %s", err) 79 return "", fmt.Errorf("Error parsing URL: %s", err)
79 } 80 }
80 u.Path += "//" + subDir 81 u.Path += "//" + subDir
82
83 // a subdir may contain wildcards, but in order to support them we
84 // have to ensure the path isn't escaped.
85 u.RawPath = u.Path
86
81 result = u.String() 87 result = u.String()
82 } 88 }
83 89