@@ -12,19 +12,18 @@ public static class EnvironmentConfig
1212 {
1313 private static readonly string [ ] VariablePrefixes = [ "ANVIL_" , "NWM_" ] ;
1414
15+ public static readonly string ? OpenSslVersionOverride = Environment . GetEnvironmentVariable ( "DOTNET_OPENSSL_VERSION_OVERRIDE" ) ;
16+
1517 public static readonly string AnvilHome = GetAnvilVariableString ( "HOME" , "./anvil" ) ;
1618 public static readonly string Encoding = GetAnvilVariableString ( "ENCODING" , "windows-1252" ) ;
19+
1720 public static readonly LogMode LogMode = GetAnvilVariableEnum ( "LOG_MODE" , LogMode . Default ) ;
21+
1822 public static readonly bool NativePrelinkEnabled = GetAnvilVariableBool ( "PRELINK_ENABLED" , true ) ;
1923 public static readonly bool PreventStartNoPlugin = GetAnvilVariableBool ( "PREVENT_START_NO_PLUGIN" ) ;
2024 public static readonly bool ReloadEnabled = GetAnvilVariableBool ( "RELOAD_ENABLED" ) ;
21- public static readonly string [ ] AdditionalPluginPaths = GetAnvilVariableArrayString ( "ADD_PLUGIN_PATHS" ) ;
2225
23- static EnvironmentConfig ( )
24- {
25- ValidateUnset ( "NLOG_CONFIG" ) ;
26- ValidateUnset ( "PLUGIN_PATH" ) ;
27- }
26+ public static readonly string [ ] AdditionalPluginPaths = GetAnvilVariableArrayString ( "ADD_PLUGIN_PATHS" ) ;
2827
2928 public static bool GetIsPluginDisabled ( string pluginName )
3029 {
@@ -65,13 +64,5 @@ private static string[] GetAnvilVariableArrayString(string key, string[]? defaul
6564
6665 return value != null ? value . Split ( Path . PathSeparator ) : defaultValue ;
6766 }
68-
69- private static void ValidateUnset ( string key )
70- {
71- if ( Environment . GetEnvironmentVariable ( key ) != null )
72- {
73- throw new Exception ( $ "Unsupported environment variable { key } . Please see the changelog for more information.") ;
74- }
75- }
7667 }
7768}
0 commit comments