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