mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-28 23:58:19 +00:00
Merge pull request #233 from runatlantis/tf-version
Fix error parsing tf version when TF_LOG set
This commit is contained in:
20
CHANGELOG.md
20
CHANGELOG.md
@@ -182,6 +182,26 @@ projects:
|
||||
## Docker
|
||||
`runatlantis/atlantis:v0.4.0`
|
||||
|
||||
# v0.3.11
|
||||
|
||||
## Features
|
||||
None
|
||||
|
||||
## Bugfixes
|
||||
* If the `TF_LOG` environment variable is set, should still be able to start. Previously `atlantis server` would exit immediately because it couldn't parse the output of `terraform version`.
|
||||
|
||||
## Backwards Incompatibilities / Notes:
|
||||
None
|
||||
|
||||
## Downloads
|
||||
* [atlantis_darwin_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.3.11/atlantis_darwin_amd64.zip)
|
||||
* [atlantis_linux_386.zip](https://github.com/runatlantis/atlantis/releases/download/v0.3.11/atlantis_linux_386.zip)
|
||||
* [atlantis_linux_amd64.zip](https://github.com/runatlantis/atlantis/releases/download/v0.3.11/atlantis_linux_amd64.zip)
|
||||
* [atlantis_linux_arm.zip](https://github.com/runatlantis/atlantis/releases/download/v0.3.11/atlantis_linux_arm.zip)
|
||||
|
||||
## Docker
|
||||
`runatlantis/atlantis:v0.3.11`
|
||||
|
||||
# v0.3.10
|
||||
|
||||
## Features
|
||||
|
||||
@@ -49,14 +49,15 @@ func NewClient(dataDir string) (*DefaultClient, error) {
|
||||
if err != nil {
|
||||
return nil, errors.New("terraform not found in $PATH. \n\nDownload terraform from https://www.terraform.io/downloads.html")
|
||||
}
|
||||
versionCmdOutput, err := exec.Command("terraform", "version").CombinedOutput() // #nosec
|
||||
output := string(versionCmdOutput)
|
||||
versionOutBytes, err := exec.Command("terraform", "version").
|
||||
Output() // #nosec
|
||||
versionOutput := string(versionOutBytes)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "running terraform version: %s", output)
|
||||
return nil, errors.Wrapf(err, "running terraform version: %s", versionOutput)
|
||||
}
|
||||
match := versionRegex.FindStringSubmatch(output)
|
||||
match := versionRegex.FindStringSubmatch(versionOutput)
|
||||
if len(match) <= 1 {
|
||||
return nil, fmt.Errorf("could not parse terraform version from %s", output)
|
||||
return nil, fmt.Errorf("could not parse terraform version from %s", versionOutput)
|
||||
}
|
||||
v, err := version.NewVersion(match[1])
|
||||
if err != nil {
|
||||
|
||||
@@ -2,7 +2,7 @@ package bitbucketserver
|
||||
|
||||
import (
|
||||
"crypto/hmac"
|
||||
"crypto/sha1"
|
||||
"crypto/sha1" // nolint: gosec
|
||||
"crypto/sha256"
|
||||
"crypto/sha512"
|
||||
"encoding/hex"
|
||||
|
||||
Reference in New Issue
Block a user