Skip to content

Instantly share code, notes, and snippets.

@josephwoodward
Created July 21, 2020 14:37
Show Gist options
  • Save josephwoodward/914677ff78e9194391496ddf342eb358 to your computer and use it in GitHub Desktop.
Save josephwoodward/914677ff78e9194391496ddf342eb358 to your computer and use it in GitHub Desktop.
public sealed class IgnoreOnAppVeyorLinuxFact : FactAttribute
{
public IgnoreOnAppVeyorLinuxFact() {
if(RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && IsAppVeyor()) {
Skip = "Ignore on Linux when run via AppVeyor";
}
}
private static bool IsAppVeyor()
=> Environment.GetEnvironmentVariable("APPVEYOR") != null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment