Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Unified Diff: web_page_replay_go/src/webpagereplay/adb_cert_installer.go

Issue 2997343002: [wpr-go] Include stderr in error msg (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « telemetry/telemetry/internal/binary_dependencies.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: web_page_replay_go/src/webpagereplay/adb_cert_installer.go
diff --git a/web_page_replay_go/src/webpagereplay/adb_cert_installer.go b/web_page_replay_go/src/webpagereplay/adb_cert_installer.go
index 53d1645c5d6dc9046c70d44aea069ff5f3552a21..6f9c4839f5f992057598a4bcb2a1e2121b7bb2ac 100644
--- a/web_page_replay_go/src/webpagereplay/adb_cert_installer.go
+++ b/web_page_replay_go/src/webpagereplay/adb_cert_installer.go
@@ -52,10 +52,12 @@ func (i *Installer) adbShell(args ...string) error {
func getIssuerHashFileName(certPath string) (string, error) {
cmd := exec.Command("openssl", "x509", "-in", certPath, "-issuer_hash_old", "-noout")
var out bytes.Buffer
+ var stderr bytes.Buffer
cmd.Stdout = &out
+ cmd.Stderr = &stderr
err := cmd.Run()
if err != nil {
- return "", err
+ return "", fmt.Errorf("%v : %s", err, stderr.String())
}
fmt.Print(out.String())
return strings.Trim(out.String(), "\r\n") + ".0", nil
« no previous file with comments | « telemetry/telemetry/internal/binary_dependencies.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698