grass icon indicating copy to clipboard operation
grass copied to clipboard

grass.script: Provide env parameter in the g.message API

Open wenzeslaus opened this issue 1 year ago • 0 comments

This makes the message, verbose and other functions consistent with other wrappers around run_command family calls. While not needed for multiple-mapset situations and parallelization, it is necessary when calls with messages are used without global environment being set and only a custom (local) environment is available which is the case in grass.script.setup (with #3438).

The PR aims at providing the interface, not updating all use cases (it will be applied for grass.script.setup in #3438).

This does not have any test since the current API does not allow for writing these test. This will be tested indirectly in the future (e.g. by #3438).

While connected to #3438, it is a separate issue more connected to the previous env parameter additions to run_command wrappers, so a separate PR and commit on main seems appropriate.

wenzeslaus avatar Feb 20 '24 02:02 wenzeslaus