mirror of
https://github.com/RPCS3/discord-bot.git
synced 2026-01-31 01:25:22 +01:00
22 lines
560 B
C#
22 lines
560 B
C#
using System;
|
|
|
|
namespace CompatBot.Utils
|
|
{
|
|
public static class SandboxDetector
|
|
{
|
|
public static string Detect()
|
|
{
|
|
if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("SNAP")))
|
|
return "Snap";
|
|
|
|
if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("FLATPAK_SYSTEM_DIR")))
|
|
return "Flatpak";
|
|
|
|
if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("RUNNING_IN_DOCKER")))
|
|
return "Docker";
|
|
|
|
return null;
|
|
}
|
|
}
|
|
}
|