]> thyrsus.com Git - src.git/commitdiff
A check for options in the wrong place. Regression testt passes.
authorEric S. Raymond <esr@thyrsus.com>
Sat, 29 Nov 2014 10:51:12 +0000 (05:51 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Sat, 29 Nov 2014 10:51:12 +0000 (05:51 -0500)
src

diff --git a/src b/src
index f87b2a637293121b355a4621f9da2b4008da9430..3b3807dccc1c2af35cab639e1661c0dd768cff3e 100755 (executable)
--- 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