EnvironmentAliases.

IsRunningOnUnix(ICakeContext) Method

Summary

Determines whether the build script running on a Unix or Linux based system.
Namespace
Cake.Common
Containing Type
EnvironmentAliases

Syntax

[CakeMethodAlias]
[CakeAliasCategory("Platform")]
public static bool IsRunningOnUnix(this ICakeContext context)

Examples

if (IsRunningOnUnix())
{
    Information("Not Windows!");
}

Attributes

Type Description
CakeMethodAliasAttribute An attribute used to mark script method aliases.
CakeAliasCategoryAttribute An attribute used for documentation of alias methods/properties.

Parameters

Name Type Description
context ICakeContext The context.

Return Value

Type Description
bool true if the build script running on a Unix or Linux based system; otherwise false.