@@ -55,11 +55,7 @@ public static void Run(
55
55
. Create (
56
56
Resolve ( Validate ( name ) ) ,
57
57
args ,
58
- #if NET8_0_OR_GREATER
59
58
[ ] ,
60
- #else
61
- Enumerable . Empty < string > ( ) ,
62
- #endif
63
59
workingDirectory ,
64
60
false ,
65
61
configureEnvironment ?? defaultAction ,
@@ -176,11 +172,7 @@ public static Task RunAsync(
176
172
. Create (
177
173
Resolve ( Validate ( name ) ) ,
178
174
args ,
179
- #if NET8_0_OR_GREATER
180
175
[ ] ,
181
- #else
182
- Enumerable . Empty < string > ( ) ,
183
- #endif
184
176
workingDirectory ,
185
177
false ,
186
178
configureEnvironment ?? defaultAction ,
@@ -296,11 +288,7 @@ private static async Task RunAsync(
296
288
. Create (
297
289
Resolve ( Validate ( name ) ) ,
298
290
args ,
299
- #if NET8_0_OR_GREATER
300
291
[ ] ,
301
- #else
302
- Enumerable . Empty < string > ( ) ,
303
- #endif
304
292
workingDirectory ,
305
293
true ,
306
294
configureEnvironment ?? defaultAction ,
@@ -388,13 +376,8 @@ private static async Task RunAsync(
388
376
await process . StandardInput . WriteAsync ( standardInput ) . ConfigureAwait ( false ) ;
389
377
process . StandardInput . Close ( ) ;
390
378
391
- #if NET8_0_OR_GREATER
392
379
readOutput = process . StandardOutput . ReadToEndAsync ( cancellationToken ) ;
393
380
readError = process . StandardError . ReadToEndAsync ( cancellationToken ) ;
394
- #else
395
- readOutput = process . StandardOutput . ReadToEndAsync ( ) ;
396
- readError = process . StandardError . ReadToEndAsync ( ) ;
397
- #endif
398
381
}
399
382
catch ( Exception )
400
383
{
@@ -443,11 +426,7 @@ private static string Resolve(string name)
443
426
444
427
var searchFileNames = string . IsNullOrEmpty ( extension )
445
428
? windowsExecutableExtensions . Select ( ex => Path . ChangeExtension ( name , ex ) ) . ToList ( )
446
- #if NET8_0_OR_GREATER
447
429
: [ name ] ;
448
- #else
449
- : new List < string > { name , } ;
450
- #endif
451
430
452
431
var path = GetSearchDirectories ( ) . SelectMany ( _ => searchFileNames , Path . Combine )
453
432
. FirstOrDefault ( File . Exists ) ;
0 commit comments