aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/go-getter/detect.go
diff options
context:
space:
mode:
authorappilon <apilon@hashicorp.com>2019-02-27 16:43:31 -0500
committerGitHub <noreply@github.com>2019-02-27 16:43:31 -0500
commit844b5a68d8af4791755b8f0ad293cc99f5959183 (patch)
tree255c250a5c9d4801c74092d33b7337d8c14438ff /vendor/github.com/hashicorp/go-getter/detect.go
parent303b299eeb6b06e939e35905e4b34cb410dd9dc3 (diff)
parent15c0b25d011f37e7c20aeca9eaf461f78285b8d9 (diff)
downloadterraform-provider-statuscake-844b5a68d8af4791755b8f0ad293cc99f5959183.tar.gz
terraform-provider-statuscake-844b5a68d8af4791755b8f0ad293cc99f5959183.tar.zst
terraform-provider-statuscake-844b5a68d8af4791755b8f0ad293cc99f5959183.zip
Merge pull request #27 from terraform-providers/go-modules-2019-02-22
[MODULES] Switch to Go Modules
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