slluis/ngit — comment on commit 7f5242b961284ae3e0b18fdbe1bb1791ee8dd5c5
File:  line 0
By linquize:

Can we use

static bool RunningOnLinux = Environment.OSVersion.Platform == PlatformID.Unix || Environment.OSVersion.Platform == PlatformID.MacOSX;

It is better than testing the method once and catch EntryPointNotFoundException.