This commit is contained in:
Sam Coe 2021-04-09 12:16:31 -07:00
parent 8a4a8dd451
commit 33d6017467
No known key found for this signature in database
GPG key ID: 8E322C20F811D086

View file

@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"path/filepath"
@ -258,11 +257,11 @@ func runView(opts *ViewOptions) error {
opts.IO.StartProgressIndicator()
runLogZip, err := getRunLog(opts.RunLogCache, httpClient, repo, run.ID)
defer runLogZip.Close()
opts.IO.StopProgressIndicator()
if err != nil {
return fmt.Errorf("failed to get run log: %w", err)
}
defer runLogZip.Close()
attachRunLog(runLogZip, jobs)
@ -485,15 +484,6 @@ func attachRunLog(rlz *zip.ReadCloser, jobs []shared.Job) {
}
}
func readZipFile(zf *zip.File) ([]byte, error) {
f, err := zf.Open()
if err != nil {
return nil, err
}
defer f.Close()
return ioutil.ReadAll(f)
}
func displayRunLog(io *iostreams.IOStreams, jobs []shared.Job, failed bool) error {
err := io.StartPager()
if err != nil {