File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
src/Grpc/Interop/test/InteropTests/Helpers Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 1- // Licensed to the .NET Foundation under one or more agreements.
1+ // Licensed to the .NET Foundation under one or more agreements.
22// The .NET Foundation licenses this file to you under the MIT license.
33
44using System . Diagnostics ;
@@ -10,20 +10,23 @@ public static class ProcessDebugHelper
1010 public static string GetDebugCommand ( ProcessStartInfo psi )
1111 {
1212 // Quote the file name if it contains spaces or special characters
13- string fileName = QuoteIfNeeded ( psi . FileName ) ;
13+ var fileName = QuoteIfNeeded ( psi . FileName ) ;
1414
1515 // Arguments are typically already passed as a single string
16- string arguments = psi . Arguments ;
16+ var arguments = psi . Arguments ;
1717
1818 return $ "{ fileName } { arguments } ". Trim ( ) ;
1919 }
2020
2121 private static string QuoteIfNeeded ( string value )
2222 {
23- if ( string . IsNullOrWhiteSpace ( value ) ) return "\" \" " ;
23+ if ( string . IsNullOrWhiteSpace ( value ) )
24+ {
25+ return "\" \" " ;
26+ }
2427
2528 // Add quotes if value contains spaces or special characters
26- if ( value . Contains ( " " ) || value . Contains ( " \" " ) )
29+ if ( value . Contains ( ' ' ) || value . Contains ( '"' ) )
2730 {
2831 return $ "\" { value . Replace ( "\" " , "\\ \" " ) } \" ";
2932 }
You can’t perform that action at this time.
0 commit comments