Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit d4a8ca6

Browse files
authored
Merge pull request #9096 from mono/env-vars-removal
[Ide] Unset some environment variables after they're no longer needed
2 parents ef6da16 + ef85100 commit d4a8ca6

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

main/src/core/MonoDevelop.Core/MonoDevelop.Core/Gettext.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ static GettextCatalog ()
138138
catch (Exception ex) {
139139
Console.WriteLine (ex);
140140
}
141+
142+
Environment.SetEnvironmentVariable ("MONODEVELOP_LOCALE_PATH", null);
143+
Environment.SetEnvironmentVariable ("MONODEVELOP_STUB_LANGUAGE", null);
141144
}
142145

143146
public static string UILocale { get; private set; }

main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,20 @@ Task<int> IApplication.Run (string[] args)
7474
return Task.FromResult (Run (options));
7575
}
7676

77+
static void UnsetEnvironmentVariables()
78+
{
79+
Environment.SetEnvironmentVariable ("MD_DISABLE_STATIC_REGISTRAR", null);
80+
81+
Environment.SetEnvironmentVariable ("MONO_ENV_OPTIONS", null);
82+
Environment.SetEnvironmentVariable ("MONO_GC_PARAMS", null);
83+
Environment.SetEnvironmentVariable ("MONO_SLEEP_ABORT_LIMIT", null);
84+
Environment.SetEnvironmentVariable ("MONO_THREADS_SUSPEND", null);
85+
}
86+
7787
int Run (MonoDevelopOptions options)
7888
{
89+
UnsetEnvironmentVariables ();
90+
7991
CompositionManager.ConfigureUninitializedMefHandling (throwException: true);
8092

8193
LoggingService.LogInfo ("Starting {0} {1}", BrandingService.ApplicationLongName, IdeVersionInfo.MonoDevelopVersion);

0 commit comments

Comments
 (0)