Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Improve how we handle stderr on pkg fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
kmoore134 committed Dec 4, 2018
1 parent d0c36aa commit 5de09ca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doupdate.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,6 @@ func startfetch() error {
log.Fatal(err)
}
buff := bufio.NewScanner(stdout)
bufferr := bufio.NewScanner(stderr)

// Iterate over buff and append content to the slice
var allText []string
Expand All @@ -658,9 +657,10 @@ func startfetch() error {
}
// If we get a non-0 back, report the full error
if err := cmd.Wait(); err != nil {
for bufferr.Scan() {
line := bufferr.Text()
sendinfomsg(line)
errbuf, _:= ioutil.ReadAll(stderr)
errarr := strings.Split(string(errbuf), "\n")
for i, _ := range errarr {
sendinfomsg(errarr[i])
}
sendfatalmsg("Failed package fetch!")
return err
Expand Down

0 comments on commit 5de09ca

Please sign in to comment.