From 675f4ba07524268b01252a6e6ec006825dbe7dc0 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Wed, 16 Aug 2023 11:01:43 +0200 Subject: [PATCH] cli: log parsing errors to stderr Error messages should always be logged to stderr not stdout. I found this while working on: https://github.com/containers/podman/pull/19635 Signed-off-by: Paul Holzinger --- src/cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.c b/src/cli.c index 39ad582e..cdc57fb1 100644 --- a/src/cli.c +++ b/src/cli.c @@ -121,7 +121,7 @@ int initialize_cli(int argc, char *argv[]) GError *error = NULL; if (!g_option_context_parse(context, &argc, &argv, &error)) { - g_print("conmon: option parsing failed: %s\n", error->message); + g_printerr("conmon: option parsing failed: %s\n", error->message); exit(EXIT_FAILURE); }