File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ func (c *Client) Get() error {
153153 // We don't appear to... but is it part of the filename?
154154 matchingLen := 0
155155 for k , _ := range decompressors {
156- if strings .HasSuffix (u .Path , k ) && len (k ) > matchingLen {
156+ if strings .HasSuffix (u .Path , "." + k ) && len (k ) > matchingLen {
157157 archiveV = k
158158 matchingLen = len (k )
159159 }
Original file line number Diff line number Diff line change @@ -31,6 +31,21 @@ func TestGet_file(t *testing.T) {
3131 }
3232}
3333
34+ // https://github.com/hashicorp/terraform/issues/11438
35+ func TestGet_fileDecompressorExt (t * testing.T ) {
36+ dst := tempDir (t )
37+ u := testModule ("basic-tgz" )
38+
39+ if err := Get (dst , u ); err != nil {
40+ t .Fatalf ("err: %s" , err )
41+ }
42+
43+ mainPath := filepath .Join (dst , "main.tf" )
44+ if _ , err := os .Stat (mainPath ); err != nil {
45+ t .Fatalf ("err: %s" , err )
46+ }
47+ }
48+
3449// https://github.com/hashicorp/terraform/issues/8418
3550func TestGet_filePercent2F (t * testing.T ) {
3651 dst := tempDir (t )
Original file line number Diff line number Diff line change 1+ # Hello
You can’t perform that action at this time.
0 commit comments