* fix s3 .gz file retrieval

* show detailed error when fail to run new binary
master
Jaime Pillora 2016-06-26 22:06:22 +10:00
parent a815be9c8e
commit be5b0b50d8
2 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ func (s *S3) Fetch() (io.Reader, error) {
return nil, fmt.Errorf("GET request failed (%s)", err)
}
//extract gz files
if strings.HasSuffix(s.Key, ".gz") && *get.ContentEncoding != "gzip" {
if strings.HasSuffix(s.Key, ".gz") && aws.StringValue(get.ContentEncoding) != "gzip" {
return gzip.NewReader(get.Body)
}
//success!

View File

@ -278,10 +278,10 @@ func (mp *master) fetch() {
}
}
}()
tokenOut, err := cmd.Output()
tokenOut, err := cmd.CombinedOutput()
returned = true
if err != nil {
mp.warnf("failed to run temp binary: %s", err)
mp.warnf("failed to run temp binary: %s (%s) output \"%s\"", err, tmpBinPath, tokenOut)
return
}
if tokenIn != string(tokenOut) {