GitAliases.

GitConfigExists<T>(ICakeContext, DirectoryPath, string) Method

Summary

Returns whether a configuration value exists with the specifed key.
Assembly
Cake.Git.dll
Namespace
Cake.Git
Containing Type
GitAliases

Syntax

public static bool GitConfigExists<T>(this ICakeContext context, DirectoryPath repositoryDirectoryPath, string key)

Examples

if (GetConfigurationExists<string>("user.email")
{
    //..
}

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Type Parameters

Name Description
T The expected configuration type.

Parameters

Name Type Description
context ICakeContext The context.
repositoryDirectoryPath DirectoryPath Repository path.
key string The configuration key.

Return Value

Type Description
bool Whether a configuration exists with the specified key.