veyron/services/mgmt/suidhelper: print the error that comes back from Run
Otherwise, it's hard to know what went wrong.
Change-Id: I0e2fc662456e7c76d28c7b82ec6dcc83d5a78140
diff --git a/services/mgmt/suidhelper/main.go b/services/mgmt/suidhelper/main.go
index c0b2970..9dc79dd 100644
--- a/services/mgmt/suidhelper/main.go
+++ b/services/mgmt/suidhelper/main.go
@@ -7,6 +7,7 @@
import (
"flag"
+ "fmt"
"os"
"veyron.io/veyron/veyron/services/mgmt/suidhelper/impl"
@@ -15,6 +16,9 @@
func main() {
flag.Parse()
if err := impl.Run(os.Environ()); err != nil {
+ fmt.Fprintf(os.Stderr, "Failed with:", err)
+ // TODO(rjkroege): We should really only print the usage message
+ // if the error is related to interpreting flags.
flag.Usage()
}
}