diff --git a/config/module/detect.go b/config/module/detect.go index f70e69a478..9a56bf82d1 100644 --- a/config/module/detect.go +++ b/config/module/detect.go @@ -41,7 +41,7 @@ func Detect(src string, pwd string) (string, error) { u, err := urlParse(getSrc) if err == nil && u.Scheme != "" { // Valid URL - return u.String(), nil + return src, nil } for _, d := range Detectors { diff --git a/config/module/detect_test.go b/config/module/detect_test.go index 69a5a6fef7..a81bba12b2 100644 --- a/config/module/detect_test.go +++ b/config/module/detect_test.go @@ -31,6 +31,12 @@ func TestDetect(t *testing.T) { "git::https://github.com/hashicorp/foo.git//bar", false, }, + { + "git::https://github.com/hashicorp/consul.git", + "", + "git::https://github.com/hashicorp/consul.git", + false, + }, } for i, tc := range cases {