Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions python/grass/script/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2246,6 +2246,8 @@ def sanitize_mapset_environment(env):
del env["WIND_OVERRIDE"]
if "GRASS_REGION" in env:
del env["GRASS_REGION"]
if "GRASS_MASK" in env:
del env["GRASS_MASK"]
return env


Expand Down
2 changes: 1 addition & 1 deletion python/grass/script/tests/grass_script_setup_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def test_grass_path_types_in_setup(tmp_path, path_type):
assert "GISBASE" in env


@pytest.mark.parametrize("variable", ["GRASS_REGION", "WIND_OVERRIDE"])
@pytest.mark.parametrize("variable", ["GRASS_REGION", "WIND_OVERRIDE", "GRASS_MASK"])
@pytest.mark.usefixtures("mock_no_session")
def test_init_removes_mapset_variables(tmp_path, variable):
"""Check that init removes mapset-specific variables from the environment.
Expand Down
Loading