Fixed the Editor Python Executor to parse and escape quotes for -ExecutePythonScript command line parameters to allow quoting python arguments containing spaces.

#jira UE-136852 - Running python script with -ExecutePythonScript doesn't allow passing python arguments with spaces
#rb Jamie.Dale

#ROBOMERGE-AUTHOR: patrick.laflamme
#ROBOMERGE-SOURCE: CL 18405205 in //UE5/Release-5.0/... via CL 18405209
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18405211 by patrick laflamme in ue5-release-engine-test branch]
This commit is contained in:
patrick laflamme
2021-12-08 09:14:28 -05:00
parent 0bb7ecf6b2
commit 98e5880317
2 changed files with 39 additions and 3 deletions

View File

@@ -496,6 +496,7 @@ bool FPythonScriptPlugin::ExecPythonCommandEx(FPythonCommandEx& InOutPythonComma
// C:\My Scripts\Test.py -param1 -param2 -> Ok
// "C:\My Scripts\Test.py " -param1 -param2 -> Ok
// "C:\My Scripts\Test.py"-param1 -param2 -> Ok
// C:\My Scripts\Test.py "param with spaces" -> OK
// C:\My Scripts\Test.py-param1 -param2 -> Error missing a space between .py and -param1
// "C:\My Scripts\Test.py -> Error missing closing quote.
// C:\My Scripts\Test.py " -> Error missing opening quote.