diff --git a/general/g.message/main.c b/general/g.message/main.c index a7a33589d4d..601ee15c56d 100644 --- a/general/g.message/main.c +++ b/general/g.message/main.c @@ -26,7 +26,12 @@ int main(int argc, char *argv[]) struct GModule *module; int debug_level; - G_gisinit(argv[0]); + /* We don't call G_gisinit() here because it validates the + * mapset, whereas this module may legitimately be even + * without a valid mapset. */ + G_set_program_name(argv[0]); + G_no_gisinit(); + G_set_gisrc_mode(G_GISRC_MODE_MEMORY); module = G_define_module(); G_add_keyword(_("general")); diff --git a/general/g.proj/main.c b/general/g.proj/main.c index 0c1acb222b1..2db200f8bfb 100644 --- a/general/g.proj/main.c +++ b/general/g.proj/main.c @@ -59,10 +59,11 @@ int main(int argc, char *argv[]) int formats; const char *epsg = NULL; + /* We don't call G_gisinit() here because it validates the + * mapset, whereas this module may legitimately be used + * (to create a new location) when none exists. */ G_set_program_name(argv[0]); - G_no_gisinit(); /* We don't call G_gisinit() here because it validates the - * mapset, whereas this module may legitmately be used - * (to create a new location) when none exists */ + G_no_gisinit(); module = G_define_module(); G_add_keyword(_("general"));