12876: Fix up error/usage messages.
[arvados.git] / lib / cli / get.go
index a7adfb65b679d70ccfbb50dffdcc9aad0bd79065..d3177f32dee9f9facf2a47c52e7402f9cc6ebc5b 100644 (file)
@@ -23,6 +23,8 @@ func Get(prog string, args []string, stdin io.Reader, stdout, stderr io.Writer)
        }()
 
        flags := flag.NewFlagSet(prog, flag.ContinueOnError)
+       flags.SetOutput(stderr)
+
        format := flags.String("format", "json", "output format (json, yaml, or uuid)")
        flags.StringVar(format, "f", "json", "output format (json, yaml, or uuid)")
        short := flags.Bool("short", false, "equivalent to --format=uuid")