Skip to content

Commit

Permalink
Merge pull request #552 from digitalocean/better-build-error
Browse files Browse the repository at this point in the history
should get command output when it fails
  • Loading branch information
hilary authored Aug 14, 2019
2 parents 4af8bbf + 2a74c7d commit 8a6ccb3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions integration/init_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package integration

import (
"fmt"
"io/ioutil"
"os"
"os/exec"
Expand Down Expand Up @@ -43,9 +44,9 @@ func TestMain(m *testing.M) {
builtBinaryPath = filepath.Join(tmpDir, path.Base(packagePath))

cmd := exec.Command("go", "build", "-o", builtBinaryPath, packagePath)
err = cmd.Run()
output, err := cmd.CombinedOutput()
if err != nil {
panic("failed to build doctl")
panic(fmt.Sprintf("failed to build doctl: %s", output))
}

code := m.Run()
Expand Down

0 comments on commit 8a6ccb3

Please sign in to comment.