File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 3737 "Missing arg" : {
3838 "commandName" : " Project" ,
3939 "commandLineArgs" : " --port 8080 --summary-file-path report.md"
40+ },
41+ "Config" : {
42+ "commandName" : " Project" ,
43+ "commandLineArgs" : " config"
4044 }
4145 }
4246}
Original file line number Diff line number Diff line change 44using Microsoft . DevProxy . Abstractions ;
55using Microsoft . Extensions . Logging ;
66using System . CommandLine ;
7+ using System . Diagnostics ;
78using System . Net ;
89
910namespace Microsoft . DevProxy ;
@@ -325,6 +326,17 @@ public RootCommand GetRootCommand(ILogger logger)
325326
326327 command . Add ( presetCommand ) ;
327328
329+ var configCommand = new Command ( "config" , "Open devproxyrc.json" ) ;
330+ configCommand . SetHandler ( ( ) =>
331+ {
332+ var cfgPsi = new ProcessStartInfo ( ConfigFile )
333+ {
334+ UseShellExecute = true
335+ } ;
336+ Process . Start ( cfgPsi ) ;
337+ } ) ;
338+ command . Add ( configCommand ) ;
339+
328340 var outdatedCommand = new Command ( "outdated" , "Check for new version" ) ;
329341 var outdatedShortOption = new Option < bool > ( "--short" , "Return version only" ) ;
330342 outdatedCommand . AddOption ( outdatedShortOption ) ;
You can’t perform that action at this time.
0 commit comments