Skip to content

Commit

Permalink
Treat service directory as single scope (#15114)
Browse files Browse the repository at this point in the history
* Treat service directory as single scope

Relates to #14969

* Resolve PR feedback
  • Loading branch information
heaths committed Sep 11, 2020
1 parent 45d0f7f commit 3cc9799
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions eng/SnippetGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public class Program
public void OnExecuteAsync()
{
var baseDirectory = new DirectoryInfo(BasePath).Name;
var baseDirParent = Directory.GetParent(BasePath).Name;
if (baseDirectory.Equals("sdk") || baseDirParent.Equals("sdk"))
if (baseDirectory.Equals("sdk"))
{
Parallel.ForEach(Directory.GetDirectories(BasePath), sdkDir => new DirectoryProcessor(sdkDir).Process());
}
Expand All @@ -32,16 +31,23 @@ public void OnExecuteAsync()

public static int Main(string[] args)
{
ConsoleColor foreground = Console.ForegroundColor;

try
{
return CommandLineApplication.Execute<Program>(args);
}
catch (Exception e)
{
Console.ForegroundColor = ConsoleColor.Red;

Console.Error.WriteLine(e.ToString());
return 1;
}

finally
{
Console.ForegroundColor = foreground;
}
}
}
}

0 comments on commit 3cc9799

Please sign in to comment.