@@ -33,6 +33,7 @@ sealed class DevProxyCommand : RootCommand
3333 Description = "The path to the configuration file"
3434 } ;
3535 internal const string NoFirstRunOptionName = "--no-first-run" ;
36+ internal const string NoWatchOptionName = "--no-watch" ;
3637 internal const string AsSystemProxyOptionName = "--as-system-proxy" ;
3738 internal const string InstallCertOptionName = "--install-cert" ;
3839 internal const string UrlsToWatchOptionName = "--urls-to-watch" ;
@@ -402,6 +403,11 @@ private void ConfigureCommand()
402403 Description = "Skip the first run experience"
403404 } ;
404405
406+ var noWatchOption = new Option < bool ? > ( NoWatchOptionName )
407+ {
408+ Description = "Disable automatic restart on configuration file changes"
409+ } ;
410+
405411 var discoverOption = new Option < bool ? > ( DiscoverOptionName )
406412 {
407413 Description = "Run Dev Proxy in discovery mode"
@@ -529,6 +535,7 @@ private void ConfigureCommand()
529535 ipAddressOption ,
530536 logLevelOption ,
531537 noFirstRunOption ,
538+ noWatchOption ,
532539 outputOption ,
533540 portOption ,
534541 recordOption ,
@@ -613,6 +620,11 @@ private void ConfigureFromOptions(ParseResult parseResult)
613620 {
614621 _proxyConfiguration . NoFirstRun = noFirstRun . Value ;
615622 }
623+ var noWatch = parseResult . GetValueOrDefault < bool ? > ( NoWatchOptionName ) ;
624+ if ( noWatch is not null )
625+ {
626+ _proxyConfiguration . NoWatch = noWatch . Value ;
627+ }
616628 var asSystemProxy = parseResult . GetValueOrDefault < bool ? > ( AsSystemProxyOptionName ) ;
617629 if ( asSystemProxy is not null )
618630 {
0 commit comments