cmd/dlv: print error when build fails in 'dlv test' (#2127)

Fixes #2126
This commit is contained in:
Alessandro Arzilli 2020-08-31 19:46:42 +02:00 committed by GitHub
parent 0165975470
commit 936c76b08c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -586,6 +586,7 @@ func testCmd(cmd *cobra.Command, args []string) {
dlvArgs, targetArgs := splitArgs(cmd, args)
err = gobuild.GoTestBuild(debugname, dlvArgs, buildFlags)
if err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
return 1
}
defer gobuild.Remove(debugname)