File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,12 @@ protected override async Task<int> Run()
8181 return 1 ;
8282 }
8383
84+ if ( _all && _version != null )
85+ {
86+ Log . Error ( "The `all` and `version` options are incompatible" ) ;
87+ return 1 ;
88+ }
89+
8490 if ( ! _all && _id == null && _name == null )
8591 {
8692 Log . Error ( "One of `id`, `name`, or `all` must be specified" ) ;
Original file line number Diff line number Diff line change @@ -63,8 +63,17 @@ protected override Task<int> Run(string[] unrecognized)
6363 var subCommandHelp = subCommand == null ? "" : " " + subCommand ;
6464 Console . WriteLine ( name + " " + cmd . Metadata . Name + subCommandHelp + argHelp ) ;
6565 Console . WriteLine ( ) ;
66+
6667 Console . WriteLine ( cmd . Metadata . HelpText ) ;
6768 Console . WriteLine ( ) ;
69+
70+ if ( cmd . Metadata . Example != null )
71+ {
72+ Console . WriteLine ( "Example:" ) ;
73+ Console . WriteLine ( $ " { cmd . Metadata . Example } ") ;
74+ Console . WriteLine ( ) ;
75+ }
76+
6877 cmd . Value . Value . PrintUsage ( ) ;
6978 return Task . FromResult ( 0 ) ;
7079 }
You can’t perform that action at this time.
0 commit comments