Skip to content

Commit

Permalink
Merge pull request #27 from hazzik/cli-current-directory
Browse files Browse the repository at this point in the history
CLI shall resolve solution path relative to current directory
  • Loading branch information
maca88 authored Jun 15, 2017
2 parents 741bdae + 487688e commit d2fb230
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Source/AsyncGenerator.CommandLine/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static AsyncCodeConfiguration Configure()
using (var stream = xmlConfig.OpenRead())
{
return AsyncCodeConfiguration.Create()
.ConfigureSolutionFromStream<XmlFileConfigurator>(stream);
.ConfigureSolutionFromStream<XmlFileConfigurator>(stream, Environment.CurrentDirectory);
}
}
var ymlConfig = new FileInfo("AsyncGenerator.yml");
Expand All @@ -56,7 +56,7 @@ static AsyncCodeConfiguration Configure()
using (var stream = ymlConfig.OpenRead())
{
return AsyncCodeConfiguration.Create()
.ConfigureSolutionFromStream<YamlFileConfigurator>(stream);
.ConfigureSolutionFromStream<YamlFileConfigurator>(stream, Environment.CurrentDirectory);
}
}

Expand Down
4 changes: 2 additions & 2 deletions Source/AsyncGenerator/Configuration/AsyncCodeConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ public AsyncCodeConfiguration ConfigureSolution(string solutionFilePath, Action<
return ConfigureSolutionFromFile(filePath, new T());
}

public AsyncCodeConfiguration ConfigureSolutionFromStream<T>(Stream stream) where T : class, ISolutionFileConfigurator, new()
public AsyncCodeConfiguration ConfigureSolutionFromStream<T>(Stream stream, string basePath = null) where T : class, ISolutionFileConfigurator, new()
{
return ConfigureSolutionFromStream(stream, new T());
return ConfigureSolutionFromStream(stream, new T(), basePath);
}

private AsyncCodeConfiguration ConfigureSolutionFromFile(string filePath, ISolutionFileConfigurator fileConfigurator)
Expand Down

0 comments on commit d2fb230

Please sign in to comment.