[GRASS-git] [OSGeo/grass] 79b2bc: g.remove: improve user message to contain more det...

Markus Neteler noreply at github.com
Tue Apr 1 14:35:40 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 79b2bc94040b948a1f25e7642c825e88a0507f4b
      https://github.com/OSGeo/grass/commit/79b2bc94040b948a1f25e7642c825e88a0507f4b
  Author: Markus Neteler <neteler at osgeo.org>
  Date:   2025-04-01 (Tue, 01 Apr 2025)

  Changed paths:
    M general/g.remove/main.c

  Log Message:
  -----------
  g.remove: improve user message to contain more details (#5484)

g.remove:

I find it unhelpful that `g.remove` is unspecific with its "file not found" message, e.g.

```bash
g.remove -f type=vector 'pattern=voronoi*'
WARNING: No data base element files found

g.remove -f type=raster,vector 'pattern=map*'
WARNING: No data base element files found

g.remove -f type=raster 'pattern=model*'
WARNING: No data base element files found

g.remove -f type=vector 'pattern=ato*'
WARNING: No data base element files found
```

Running this in scripted (cloud) environments may flood the logs with messages not helpful for debugging.

This PR changes the message to

```bash
g.remove -f type=raster 'pattern=bla*'
No file(s) found for type(s): raster

g.remove -f type=region 'pattern=bla*'
No file(s) found for type(s): region

g.remove -f type=all 'pattern=bla*'
No file(s) found for type(s): raster, raster_3d, vector, region, group
```

Co-authored-by: Nicklas Larsson <n_larsson at yahoo.com>



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list