diff --git a/CHANGELOG.md b/CHANGELOG.md index 5127378..b5b26dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 0.2.0 - 2019-06-13 + +### Changed + +- When extracting archives, look for the 1st file that has prefix `terraform-` in its base name + ## 0.1.0 - 2019-06-13 ### Added diff --git a/README.md b/README.md index b2d9eb7..e19af51 100644 --- a/README.md +++ b/README.md @@ -21,12 +21,12 @@ Please note that FUSE must be available (macOS requires OSXFUSE - https://osxfus Just download the binary for your platform from the [latest release page](https://github.com/github.com/paraterraform/para/releases/latest) with `wget`: ```bash -wget -O para "https://github.com/paraterraform/para/releases/download/v0.1.0/para_v0.1.0_$(uname -s | tr '[:upper:]' '[:lower:]')-amd64" +wget -O para "https://github.com/paraterraform/para/releases/download/v0.2.0/para_v0.2.0_$(uname -s | tr '[:upper:]' '[:lower:]')-amd64" chmod +x para ``` or `curl`: ```bash -curl -Lo para "https://github.com/paraterraform/para/releases/download/v0.1.0/para_v0.1.0_$(uname -s | tr '[:upper:]' '[:lower:]')-amd64" +curl -Lo para "https://github.com/paraterraform/para/releases/download/v0.2.0/para_v0.2.0_$(uname -s | tr '[:upper:]' '[:lower:]')-amd64" chmod +x para ``` diff --git a/utils/url.go b/utils/url.go index fec13ed..c2a4211 100644 --- a/utils/url.go +++ b/utils/url.go @@ -99,6 +99,9 @@ func UrlOpen(url string) (io.ReadCloser, error) { } err = archiver.Walk(rawData.Name(), func(f archiver.File) error { + if !strings.HasPrefix(strings.ToLower(f.Name()), "terraform-") { + return nil + } _, err = io.Copy(uncompressedData, f.ReadCloser) if err != nil { return err