using System;
using System.Linq;

public static class AppConfig
{
    // // Computed once, cached forever — reading it anywhere costs nothing.
    // public static readonly bool DebugMode =
    //     Environment.GetCommandLineArgs().Contains("--debug");

    public static readonly bool DebugMode = Compute();

    private static bool Compute()
    {
        var argv = Environment.GetCommandLineArgs();
        Console.WriteLine("argv = [" + string.Join(" | ", argv) + "]");
        return argv.Contains("--debug")
            || Environment.GetEnvironmentVariable("EARS_DEBUG") == "1";
    }
    
}