Skip to content

Commit

Permalink
Treat service directory as single scope
Browse files Browse the repository at this point in the history
Relates to Azure#14969
  • Loading branch information
heaths committed Sep 11, 2020
1 parent b9d47be commit 74a40de
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions eng/SnippetGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ 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 +32,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 74a40de

Please sign in to comment.