GLib.environ_setenv
function environ_setenv(envp: Array(String), variable: String, value: String, overwrite: Boolean): Array(String) { // Gjs wrapper for g_environ_setenv() }
Sets the environment variable variable in the provided list envp to value.
Since 2.32
- envp
an environment list that can be freed using GLib.strfreev (e.g., as returned from GLib.get_environ), or null for an empty environment list
- variable
the environment variable to set, must not contain '='
- value
the value for to set the variable to
- overwrite
whether to change the variable if it already exists
- Returns
the updated environment list. Free it using GLib.strfreev.