From 6b8d86ff60bf4acf6f8d6d686670e7e27a10ac37 Mon Sep 17 00:00:00 2001 From: Paul Higinbotham Date: Tue, 15 Aug 2017 09:42:29 -0700 Subject: [PATCH] Fixes KeyFilePath parameter for Linux systems (#4529) --- .../remoting/common/RunspaceConnectionInfo.cs | 30 ++++++++++++++++++- .../fanin/OutOfProcTransportManager.cs | 6 ++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/System.Management.Automation/engine/remoting/common/RunspaceConnectionInfo.cs b/src/System.Management.Automation/engine/remoting/common/RunspaceConnectionInfo.cs index aeaa379110..e444e1e272 100644 --- a/src/System.Management.Automation/engine/remoting/common/RunspaceConnectionInfo.cs +++ b/src/System.Management.Automation/engine/remoting/common/RunspaceConnectionInfo.cs @@ -2217,7 +2217,35 @@ namespace System.Management.Automation.Runspaces { var argvList = new List(); argvList.Add(psi.FileName); - argvList.AddRange(psi.Arguments.Split(' ')); + + var argsToParse = psi.Arguments.Trim(); + var argsLength = argsToParse.Length; + for (int i=0; i