Skip to content

Commit

Permalink
Merge pull request #1317 from OmniSharp/feature/omnisharp-home
Browse files Browse the repository at this point in the history
allow setting a custom OmniSharp home directory
  • Loading branch information
filipw authored Oct 17, 2018
2 parents e4dc62b + 5b5a5a2 commit 7f5abf1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All changes to the project will be documented in this file.

## [1.32.7] - not yet released
* It's now possible to override the default location of OmniSharp's global folder (%USERPROFILE%\.omnisharp or ~/.omnisharp.) with an OMNISHARPHOME environment variable (PR: [#1317](https://github.com/OmniSharp/omnisharp-roslyn/pull/1317))

## [1.32.6] - 2018-10-02
* Fixed a bug where virtual C# documents would not get promoted to be a part of a project. (PR: [#1306](https://github.com/OmniSharp/omnisharp-roslyn/pull/1306)).
* Added MinFilterLength to configure the number of characters a user must type in for FindSymbolRequest command to return any results (default is 0 to preserve existing behavior). Additionally added MaxItemsToReturn for configuring maximum number of items returned by the FindSymbolsRequestAPI.(PR: [#1284](https://github.com/OmniSharp/omnisharp-roslyn/pull/1284)).
Expand Down
5 changes: 2 additions & 3 deletions src/OmniSharp.Host/Services/OmniSharpEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ public class OmniSharpEnvironment : IOmniSharpEnvironment
{
public string TargetDirectory { get; }
public string SharedDirectory { get; }

public string SolutionFilePath { get; }

public int HostProcessId { get; }
public LogLevel LogLevel { get; }

public string[] AdditionalArguments { get; }

public OmniSharpEnvironment(
Expand Down Expand Up @@ -45,9 +42,11 @@ public OmniSharpEnvironment(
LogLevel = logLevel;
AdditionalArguments = additionalArguments;

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

Expand Down

0 comments on commit 7f5abf1

Please sign in to comment.