replace

abstract fun replace(variable: String, value: String, options: EnvironmentVariableMutatorOptions = definedExternally)(source)

Replace an environment variable with a value.

Note that an extension can only make a single change to any one variable, so this will overwrite any previous calls to replace, append or prepend.

Parameters

variable

The variable to replace.

value

The value to replace the variable with.

options

Options applied to the mutator, when no options are provided this will default to { applyAtProcessCreation: true }.

Online Documentation