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

Markus Neteler noreply at github.com
Wed Apr 2 02:34:22 PDT 2025


  Branch: refs/heads/releasebranch_8_4
  Home:   https://github.com/OSGeo/grass
  Commit: 9ae505780ff42997c686e4207c026f036770661a
      https://github.com/OSGeo/grass/commit/9ae505780ff42997c686e4207c026f036770661a
  Author: Markus Neteler <neteler at osgeo.org>
  Date:   2025-04-02 (Wed, 02 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