From 1469c1ecd6be38e2b75aecf675eca8093c315035 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 29 Nov 2014 05:51:12 -0500 Subject: [PATCH] A check for options in the wrong place. Regression testt passes. --- src | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src b/src index f87b2a6..3b3807d 100755 --- a/src +++ b/src @@ -1932,6 +1932,8 @@ if __name__ == "__main__": repodir = commandline[1] explicit = True commandline.pop(0) + else: + croak("unknown option %s before command verb" % commandline[0]) commandline.pop(0) # RCS backwards-compatibility hack @@ -1947,7 +1949,7 @@ if __name__ == "__main__": if commandline[0] in dispatch: dispatch[commandline[0]](*commandline[1:]) else: - sys.stderr.write("src: no such command as '%s'. Try 'src help'\n" \ + croak("no such command as '%s'. Try 'src help'" \ % commandline[0]) except KeyboardInterrupt: pass -- 2.43.0