Skip to content

Commit e1353fb

Browse files
committed
allow setting custom OMNISHARP HOME directory
1 parent e4dc62b commit e1353fb

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎src/OmniSharp.Host/Services/OmniSharpEnvironment.cs‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@ public class OmniSharpEnvironment : IOmniSharpEnvironment
88
{
99
public string TargetDirectory { get; }
1010
public string SharedDirectory { get; }
11-
1211
public string SolutionFilePath { get; }
13-
1412
public int HostProcessId { get; }
1513
public LogLevel LogLevel { get; }
16-
1714
public string[] AdditionalArguments { get; }
1815

1916
public OmniSharpEnvironment(
@@ -45,9 +42,11 @@ public OmniSharpEnvironment(
4542
LogLevel = logLevel;
4643
AdditionalArguments = additionalArguments;
4744

45+
// First look at OMNISHARPHOME to allow users to set custom location, then
4846
// On Windows: %USERPROFILE%\.omnisharp\omnisharp.json
4947
// On Mac/Linux: ~/.omnisharp/omnisharp.json
5048
var root =
49+
Environment.GetEnvironmentVariable("OMNISHARPHOME") ??
5150
Environment.GetEnvironmentVariable("USERPROFILE") ??
5251
Environment.GetEnvironmentVariable("HOME");
5352

0 commit comments

Comments
 (0)