@@ -101,7 +101,7 @@ void Install()
101101 if ( netshResult != 0 )
102102 Console . WriteLine ( $ "Could not add URL reservation for { listenUri } : `netsh` returned { netshResult } ; ignoring") ;
103103
104- var exePath = Path . Combine ( AppDomain . CurrentDomain . BaseDirectory ! , Program . BinaryName ) ;
104+ var exePath = Path . Combine ( AppDomain . CurrentDomain . BaseDirectory , Program . BinaryName ) ;
105105 var forwarderRunCmdline = $ "\" { exePath } \" forwarder run --pre --storage=\" { _storagePath . StorageRootPath } \" ";
106106
107107 var binPath = forwarderRunCmdline . Replace ( "\" " , "\\ \" " ) ;
@@ -117,7 +117,7 @@ void Install()
117117 var sc = Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . System ) , "sc.exe" ) ;
118118 if ( 0 != CaptiveProcess . Run ( sc , scCmdline , Console . WriteLine , Console . WriteLine ) )
119119 {
120- throw new ArgumentException ( "Service setup failed" ) ;
120+ throw new ArgumentException ( "Service setup failed. " ) ;
121121 }
122122
123123 Console . WriteLine ( "Setting service restart policy..." ) ;
@@ -132,8 +132,6 @@ void Install()
132132
133133 void GiveFullControl ( string target )
134134 {
135- if ( target == null ) throw new ArgumentNullException ( nameof ( target ) ) ;
136-
137135 if ( ! Directory . Exists ( target ) )
138136 Directory . CreateDirectory ( target ) ;
139137
@@ -147,7 +145,7 @@ void GiveFullControl(string target)
147145 static string MakeListenUriReservationPattern ( string uri )
148146 {
149147 var listenUri = uri . Replace ( "localhost" , "+" ) ;
150- if ( ! listenUri . EndsWith ( "/" ) )
148+ if ( ! listenUri . EndsWith ( '/' ) )
151149 listenUri += "/" ;
152150 return listenUri ;
153151 }
0 commit comments