You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] t.connect: inconstisten return after leaving #7538
t.connect returns inconsistent (or at least unexpectedly changed) output after attempting to print connection information in shell style.
Running:
t.connect -pg
t.connect -g
t.connect -pg
Returns first empty keys, so nothing, so keys with default values assigned. Yet no TGIS DB is created (which is good).
t.connect may be used to quickly check if STDS may exist in the mapset. However, this inconsistency may make such a check less reliable...
To reproduce
# Create project
$ grass -c EPSG:4326 /tmp/WGS84 -e
# Create an empty mapset
$ grass -c /tmp/WGS84/t_connect -e
# Print TGIS connection in shell format (note the empty fields)
$ grass /tmp/WGS84/t_connect --exec t.connect -pg
driver=
database=
# List mapset content (no TGIS DB created)
$ ls -a /tmp/WGS84/t_connect
. .. sqlite .tmp VAR WIND
# Run t.connect only with the -g flag (no return)
$ grass /tmp/WGS84/t_connect --exec t.connect -g
# List mapset content (still no TGIS DB created)
$ ls -a /tmp/WGS84/t_connect
. .. sqlite .tmp VAR WIND
# Notice the different output when of t.connect -pg
$ grass /tmp/WGS84/t_connect --exec t.connect -pg
driver=sqlite
database=$GISDBASE/$LOCATION_NAME/$MAPSET/tgis/sqlite.db
Expected behavior
Unless no TGIS DB connection is explicitly created/configured by the user, output should be consistently empty, indicating a that no TGIS connection is configured for the mapset (and thus no STDS exist).
System description
Operating System: Fedora Linux 42
GRASS version: 8.6
Additional information
This can probably be addressed when JSON format is implemented...
It looks like the -g flag creates or edits the VAR file writing the connection in there but actually not creating the database. It should not create/edit the VAR file.
Activity
petrasovaa commentedon Jun 12, 2026
It looks like the -g flag creates or edits the VAR file writing the connection in there but actually not creating the database. It should not create/edit the VAR file.