File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,7 @@ public class Program
1919 public void OnExecuteAsync ( )
2020 {
2121 var baseDirectory = new DirectoryInfo ( BasePath ) . Name ;
22- var baseDirParent = Directory . GetParent ( BasePath ) . Name ;
23- if ( baseDirectory . Equals ( "sdk" ) || baseDirParent . Equals ( "sdk" ) )
22+ if ( baseDirectory . Equals ( "sdk" ) )
2423 {
2524 Parallel . ForEach ( Directory . GetDirectories ( BasePath ) , sdkDir => new DirectoryProcessor ( sdkDir ) . Process ( ) ) ;
2625 }
@@ -32,16 +31,23 @@ public void OnExecuteAsync()
3231
3332 public static int Main ( string [ ] args )
3433 {
34+ ConsoleColor foreground = Console . ForegroundColor ;
35+
3536 try
3637 {
3738 return CommandLineApplication . Execute < Program > ( args ) ;
3839 }
3940 catch ( Exception e )
4041 {
42+ Console . ForegroundColor = ConsoleColor . Red ;
43+
4144 Console . Error . WriteLine ( e . ToString ( ) ) ;
4245 return 1 ;
4346 }
44-
47+ finally
48+ {
49+ Console . ForegroundColor = foreground ;
50+ }
4551 }
4652 }
4753}
You can’t perform that action at this time.
0 commit comments