Unset environment variable in an exec task

How do I unset an existing environment variable in an Exec task? The environment keyword lets me set new environment variables and change existing ones, but I can’t figure out how to remove variables.

When I just set the variable to an empty string, the program complains Unrecognized --cpu_bind argument ""

This is related to this post on the old forum:

environment is a map, so environment.remove("SOME_ENV_VAR").

2 Likes