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)
30
30
31
31
string platformFolder = isWindows ? WinFolderName : UnixFolderName ;
32
32
33
- string argsString = args . Length > 0 ? string . Join ( " " , args ) : null ;
33
+ var arguments = new List < string > ( args . Length + 1 ) ;
34
34
var pwshPath = Path . Combine ( currentPath , platformFolder , PwshDllName ) ;
35
- string processArgs = string . IsNullOrEmpty ( argsString ) ? $ "\" { pwshPath } \" " : $ "\" { pwshPath } \" { argsString } ";
35
+ arguments . Add ( pwshPath ) ;
36
+ arguments . AddRange ( args ) ;
36
37
37
38
if ( File . Exists ( pwshPath ) )
38
39
{
@@ -41,7 +42,7 @@ public static int Main(string[] args)
41
42
e . Cancel = true ;
42
43
} ;
43
44
44
- var process = System . Diagnostics . Process . Start ( "dotnet" , processArgs ) ;
45
+ var process = System . Diagnostics . Process . Start ( "dotnet" , arguments ) ;
45
46
process . WaitForExit ( ) ;
46
47
return process . ExitCode ;
47
48
}
You can’t perform that action at this time.
0 commit comments