From 31c4b42eadd54d2285d9d0017a65d90a2be80d03 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sat, 3 Oct 2020 16:02:09 +0200 Subject: [PATCH] Show usage and exit non-zero for unsupported option in lefty Towards https://gitlab.com/graphviz/graphviz/-/issues/1843. --- cmd/lefty/lefty.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/lefty/lefty.c b/cmd/lefty/lefty.c index e49eaa7ac..25cf1eccd 100644 --- a/cmd/lefty/lefty.c +++ b/cmd/lefty/lefty.c @@ -471,7 +471,8 @@ static void processargs (int argc, char *argv[]) { fclose(fp); fp = stdin; } else if (argv[0][0] == '-') { - fprintf (stderr, "option %s unrecognized - ignored\n", argv[0]); + fprintf (stderr, "option %s unrecognized\n", argv[0]); + usage(1); } else { if (fp != NULL && fp != stdin) -- 2.50.1