CakeEnvironmentExtensions.

ExpandEnvironmentVariables(ICakeEnvironment, string) Method

Summary

Expands the environment variables in the provided text.
Namespace
Cake.Core
Containing Type
CakeEnvironmentExtensions

Syntax

public static string ExpandEnvironmentVariables(this ICakeEnvironment environment, string text)

Examples

var expanded = environment.ExpandEnvironmentVariables("%APPDATA%/foo");

Parameters

Name Type Description
environment ICakeEnvironment The environment.
text string A string containing the names of zero or more environment variables.

Return Value

Type Description
string A string with each environment variable replaced by its value.