[GRASS-SVN] r73578 - grass/trunk/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Oct 21 03:57:54 PDT 2018


Author: huhabla
Date: 2018-10-21 03:57:53 -0700 (Sun, 21 Oct 2018)
New Revision: 73578

Modified:
   grass/trunk/lib/gis/parser.c
Log:
Fixed bug in parser introduced with r73525 and r73561

Modified: grass/trunk/lib/gis/parser.c
===================================================================
--- grass/trunk/lib/gis/parser.c	2018-10-20 08:19:14 UTC (rev 73577)
+++ grass/trunk/lib/gis/parser.c	2018-10-21 10:57:53 UTC (rev 73578)
@@ -508,11 +508,6 @@
 	while (--argc) {
 	    ptr = *(++argv);
 
-	    /* JSON print option */
-	    if (strcmp(ptr, "--json") == 0) {
-		print_json = 1;
-	    }
-
 	    if (strcmp(ptr, "help") == 0 || strcmp(ptr, "--h") == 0 ||
 		strcmp(ptr, "-help") == 0 || strcmp(ptr, "--help") == 0) {
 		G_usage();
@@ -519,6 +514,12 @@
 		exit(EXIT_SUCCESS);
 	    }
 
+	    /* JSON print option */
+	    if (strcmp(ptr, "--json") == 0) {
+		print_json = 1;
+		continue;
+	    }
+
 	    /* Overwrite option */
 	    if (strcmp(ptr, "--o") == 0 || strcmp(ptr, "--overwrite") == 0) {
 		st->overwrite = 1;



More information about the grass-commit mailing list