Skip to content

Commit 8b800a9

Browse files
committed
able to find parent directory
1 parent 1334020 commit 8b800a9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Incrementalist.Cmd/Program.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Diagnostics;
33
using System.IO;
44
using System.Runtime.InteropServices;
5+
using Incrementalist.FileSystem;
56
using LibGit2Sharp;
67

78
namespace Incrementalist.Cmd
@@ -44,8 +45,18 @@ static int Main(string[] args)
4445
Console.WriteLine("Are we inside repository? {0}", insideRepo);
4546
//if (insideRepo)
4647
//{
47-
Console.WriteLine("Repo base is located in {0}", Repository.Discover(Directory.GetCurrentDirectory()));
48+
var repoFolder = Repository.Discover(Directory.GetCurrentDirectory());
49+
50+
Console.WriteLine("Repo base is located in {0}", repoFolder);
4851
//}
52+
if (!string.IsNullOrEmpty(repoFolder))
53+
{
54+
var workingFolder = Directory.GetParent(repoFolder).Parent;
55+
foreach (var sln in SolutionFinder.GetSolutions(workingFolder.FullName))
56+
{
57+
Console.WriteLine("Found solution file {0}", sln);
58+
}
59+
}
4960

5061
ResetTitle();
5162
return 0;

0 commit comments

Comments
 (0)