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

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Mar 25 07:32:39 PDT 2016


Author: martinl
Date: 2016-03-25 07:32:39 -0700 (Fri, 25 Mar 2016)
New Revision: 68147

Modified:
   grass/trunk/lib/gis/parser.c
Log:
don't launch GUI dialogs from command line when GUI is text

Modified: grass/trunk/lib/gis/parser.c
===================================================================
--- grass/trunk/lib/gis/parser.c	2016-03-25 14:08:34 UTC (rev 68146)
+++ grass/trunk/lib/gis/parser.c	2016-03-25 14:32:39 UTC (rev 68147)
@@ -321,6 +321,7 @@
 {
     int need_first_opt;
     int opt_checked = 0;
+    const char *gui_envvar;
     char *ptr, *tmp_name, *err;
     int i;
     struct Option *opt;
@@ -433,9 +434,10 @@
     }
 
     /* If there are NO arguments, go interactive */
-
+    gui_envvar = G_getenv_nofatal("GUI");
     if (argc < 2 && (st->has_required || G__has_required_rule())
-        && !st->no_interactive && isatty(0)) {
+        && !st->no_interactive && isatty(0) &&
+        G_strcasecmp(gui_envvar, "text") != 0) {
 	if (module_gui_wx() == 0)
             return -1;
     }



More information about the grass-commit mailing list