File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -889,8 +889,25 @@ static async Task RunOptionsAndReturnExitCodeAsync(Options o)
889889 }
890890 }
891891
892- #endregion
892+ #endregion
893893
894+ // done nothing...
895+ // because of short-comings in CommandLine parsing
896+ // need to customize the output to provide a consistent output
897+ var parser = new Parser ( config => config . HelpWriter = null ) ;
898+ var result = parser . ParseArguments < Options > ( new [ ] { "" , "" } ) ;
899+
900+ var helpText = new HelpText (
901+ new HeadingInfo ( _headerInfo ) ,
902+ _copyrightInfo )
903+ . AddPreOptionsLine ( "" )
904+ . AddPreOptionsLine ( "No operation was performed with the options supplied." )
905+ . AddPreOptionsLine ( "" )
906+ . AddPreOptionsLine ( HelpText . RenderUsageText ( result ) )
907+ . AddPreOptionsLine ( "" )
908+ . AddOptions ( result ) ;
909+
910+ Console . WriteLine ( helpText . ToString ( ) ) ;
894911 }
895912
896913 private static void OutputError ( ExitCodes errorCode , bool outputMessage , string extraMessage = null )
You can’t perform that action at this time.
0 commit comments