From: Magnus Jacobsson Date: Sat, 3 Oct 2020 13:59:40 +0000 (+0200) Subject: Show usage and exit non-zero for unsupported option in gvedit X-Git-Tag: 2.46.0~20^2^2~47^2~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5712785e38665f9c4a73cff482d56b1829e93e68;p=graphviz Show usage and exit non-zero for unsupported option in gvedit Towards https://gitlab.com/graphviz/graphviz/-/issues/1843. --- diff --git a/cmd/gvedit/main.cpp b/cmd/gvedit/main.cpp index 0901e5e3a..b10624ab4 100644 --- a/cmd/gvedit/main.cpp +++ b/cmd/gvedit/main.cpp @@ -68,9 +68,11 @@ static char **parseArgs(int argc, char *argv[]) case '?': if (optopt == '\0') usage(0); - else + else { errout << cmd << " : option -" << ((char) optopt) << - " unrecognized - ignored\n" << flush; + " unrecognized\n" << flush; + usage(1); + } break; } }