File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/Microsoft.PowerShell.GlobalTool.Shim Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,10 @@ public static int Main(string[] args)
3030
3131 string platformFolder = isWindows ? WinFolderName : UnixFolderName ;
3232
33- string argsString = args . Length > 0 ? string . Join ( " " , args ) : null ;
33+ var arguments = new List < string > ( args . Length + 1 ) ;
3434 var pwshPath = Path . Combine ( currentPath , platformFolder , PwshDllName ) ;
35- string processArgs = string . IsNullOrEmpty ( argsString ) ? $ "\" { pwshPath } \" " : $ "\" { pwshPath } \" { argsString } ";
35+ arguments . Add ( pwshPath ) ;
36+ arguments . AddRange ( args ) ;
3637
3738 if ( File . Exists ( pwshPath ) )
3839 {
@@ -41,7 +42,7 @@ public static int Main(string[] args)
4142 e . Cancel = true ;
4243 } ;
4344
44- var process = System . Diagnostics . Process . Start ( "dotnet" , processArgs ) ;
45+ var process = System . Diagnostics . Process . Start ( "dotnet" , arguments ) ;
4546 process . WaitForExit ( ) ;
4647 return process . ExitCode ;
4748 }
You can’t perform that action at this time.
0 commit comments