mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Fix env vars not being set up early
This commit is contained in:
1 parent
5340a1c987
commit
377f824628
1 file changed
+2
-2
@@ -9,8 +9,6 @@ namespace BepInEx.Preloader
|
||||
{
|
||||
public static void PreloaderMain(string[] args)
|
||||
{
|
||||
EnvVars.LoadVars();
|
||||
|
||||
string bepinPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetFullPath(EnvVars.DOORSTOP_INVOKE_DLL_PATH)));
|
||||
|
||||
Paths.SetExecutablePath(args[0], bepinPath, EnvVars.DOORSTOP_MANAGED_FOLDER_DIR);
|
||||
@@ -50,6 +48,8 @@ namespace BepInEx.Preloader
|
||||
/// </param>
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
EnvVars.LoadVars();
|
||||
|
||||
// Get the path of this DLL via Doorstop env var because Assembly.Location mangles non-ASCII characters on some versions of Mono for unknown reasons
|
||||
preloaderPath = Path.GetDirectoryName(Path.GetFullPath(EnvVars.DOORSTOP_INVOKE_DLL_PATH));
|
||||
|
||||
|
||||
Reference in new issue
Block a user