Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Commit

Permalink
Rename sources to projectSearchPaths in global.json
Browse files Browse the repository at this point in the history
- Allow sources to stay for now while projects transition

#925
  • Loading branch information
davidfowl committed Jan 19, 2015
1 parent c48e8d1 commit 4645885
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/Microsoft.Framework.Runtime/GlobalSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class GlobalSettings
{
public const string GlobalFileName = "global.json";

public IList<string> SourcePaths { get; private set; }
public IList<string> ProjectSearchPaths { get; private set; }
public IDictionary<Library, string> PackageHashes { get; private set; }
public string PackagesPath { get; private set; }
public string FilePath { get; private set; }
Expand Down Expand Up @@ -53,10 +53,11 @@ public static bool TryGetGlobalSettings(string path, out GlobalSettings globalSe
throw FileFormatException.Create(ex, globalJsonPath);
}

var sources = settings["sources"];
// TODO: Remove sources
var projectSearchPaths = settings["projects"] ?? settings["sources"];
var dependencies = settings["dependencies"] as JObject;

globalSettings.SourcePaths = sources == null ? new string[] { } : sources.ToObject<string[]>();
globalSettings.ProjectSearchPaths = projectSearchPaths == null ? new string[] { } : projectSearchPaths.ToObject<string[]>();
globalSettings.PackagesPath = settings.Value<string>("packages");
globalSettings.PackageHashes = new Dictionary<Library, string>();
globalSettings.FilePath = globalJsonPath;
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Framework.Runtime/ProjectResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ private IEnumerable<string> ResolveSearchPaths(string projectPath, string rootPa

if (GlobalSettings.TryGetGlobalSettings(rootPath, out global))
{
foreach (var sourcePath in global.SourcePaths)
foreach (var sourcePath in global.ProjectSearchPaths)
{
paths.Add(Path.Combine(rootPath, sourcePath));
}
Expand Down

0 comments on commit 4645885

Please sign in to comment.