HTML5 packaging fails due to space in directory

Build: 4.2.1 (From code)

Project
Unedited basic-code template

Description
UnrealFrontend fails to package the HTML5 content due to a space in a parent folder of the output or uproject directory.
I repoed this and attempted a fix by moving the project to the root J:/ which resulted in a successful packaging via FrontEnd. I also ran the command printed in the log via cmd without and with quotes around output and uproject, the latter being successful:

    CommandUtils.Run: Run: C:\Windows\system32\cmd.exe /c "E:/Program Files/Emscripten/emscripten/1.16.0\tools\file_packager.py" J:\Game Projects\Active\Unreal Projects\MyProject3\Binaries\HTML5\MyProject3.data --preload . --pre-run --js-output=J:\Game Projects\Active\Unreal Projects\MyProject3\Binaries\HTML5\MyProject3.data.js

Log

Project.LogDeploymentContext: Deployment Context **************

Project.LogDeploymentContext: ArchiveDirectory = HTML5

Project.LogDeploymentContext: RawProjectPath = J:\Game Projects\Active\Unreal Projects\MyProject3\MyProject3.uproject

Project.LogDeploymentContext: IsCodeBasedUprojectFile = True

Project.LogDeploymentContext: DedicatedServer = False

Project.LogDeploymentContext: Stage = True

Project.LogDeploymentContext: StageTargetPlatform = HTML5

Project.LogDeploymentContext: LocalRoot = E:\GitHub\UnrealEngine

Project.LogDeploymentContext: ProjectRoot = J:\Game Projects\Active\Unreal Projects\MyProject3

Project.LogDeploymentContext: PlatformDir = HTML5

Project.LogDeploymentContext: StageProjectRoot = J:\Game Projects\Active\Unreal Projects\MyProject3\Saved\StagedBuilds\HTML5\MyProject3

Project.LogDeploymentContext: ShortProjectName = MyProject3

Project.LogDeploymentContext: StageDirectory = J:\Game Projects\Active\Unreal Projects\MyProject3\Saved\StagedBuilds\HTML5

Project.LogDeploymentContext: SourceRelativeProjectRoot = MyProject3

Project.LogDeploymentContext: RelativeProjectRootForStage = MyProject3

Project.LogDeploymentContext: RelativeProjectRootForUnrealPak = MyProject3

Project.LogDeploymentContext: ProjectArgForCommandLines = ../../../MyProject3/MyProject3.uproject

Project.LogDeploymentContext: RuntimeRootDir = J:\Game Projects\Active\Unreal Projects\MyProject3\Saved\StagedBuilds\HTML5

Project.LogDeploymentContext: RuntimeProjectRootDir = J:\Game Projects\Active\Unreal Projects\MyProject3\Saved\StagedBuilds\HTML5\MyProject3

Project.LogDeploymentContext: UProjectCommandLineArgInternalRoot = ../../../

Project.LogDeploymentContext: PakFileInternalRoot = ../../../

Project.LogDeploymentContext: UnrealFileServerInternalRoot = ../../../

Project.LogDeploymentContext: End Deployment Context **************

HTML5Platform.Package: Package J:\Game Projects\Active\Unreal Projects\MyProject3\MyProject3.uproject

InternalUtils.SafeFileExists: SafeFileExists C:\Windows\system32\cmd.exe=True

CommandUtils.Run: Run: C:\Windows\system32\cmd.exe /c "E:/Program Files/Emscripten/emscripten/1.16.0\tools\file_packager.py" J:\Game Projects\Active\Unreal Projects\MyProject3\Binaries\HTML5\MyProject3.data --preload . --pre-run --js-output=J:\Game Projects\Active\Unreal Projects\MyProject3\Binaries\HTML5\MyProject3.data.js

cmd: Unknown parameter: Projects\Active\Unreal

CommandUtils.Run: Run: Took 0.2310132s to run cmd.exe

BuildCommand.Execute: ERROR: BUILD FAILED

Program.Main: ERROR: AutomationTool terminated with exception:

Program.Main: ERROR: Exception in AutomationTool: Command failed (Result:1): C:\Windows\system32\cmd.exe /c "E:/Program Files/Emscripten/emscripten/1.16.0\tools\file_packager.py" J:\Game Projects\Active\Unreal Projects\MyProject3\Binaries\HTML5\MyProject3.data --preload . --pre-run --js-output=J:\Game Projects\Active\Unreal Projects\MyProject3\Binaries\HTML5\MyProject3.data.js. See logfile for details: 'cmd.txt' 

Stacktrace:    at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options) in e:\GitHub\UnrealEngine\Engine\Source\Programs\AutomationTool\ProcessUtils.cs:line 755

   at HTML5Platform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL) in e:\GitHub\UnrealEngine\Engine\Source\Programs\AutomationTool\HTML5\HTML5Platform.Automation.cs:line 37

   at Project.Package(ProjectParams Params, Int32 WorkingCL) in e:\GitHub\UnrealEngine\Engine\Source\Programs\AutomationTool\Scripts\PackageCommand.Automation.cs:line 52

   at BuildCookRun.DoBuildCookRun(ProjectParams Params) in e:\GitHub\UnrealEngine\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 238

   at BuildCommand.Execute() in e:\GitHub\UnrealEngine\Engine\Source\Programs\AutomationTool\BuildCommand.cs:line 37

   at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands) in e:\GitHub\UnrealEngine\Engine\Source\Programs\AutomationTool\Automation.cs:line 362

   at AutomationTool.Automation.Process(String[] CommandLine) in e:\GitHub\UnrealEngine\Engine\Source\Programs\AutomationTool\Automation.cs:line 330

   at AutomationTool.Program.MainProc(Object Param) in e:\GitHub\UnrealEngine\Engine\Source\Programs\AutomationTool\Program.cs:line 98

   at AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param) in e:\GitHub\UnrealEngine\Engine\Source\Programs\AutomationTool\Utils.cs:line 610

   at AutomationTool.Program.Main() in e:\GitHub\UnrealEngine\Engine\Source\Programs\AutomationTool\Program.cs:line 50

Program.Main: ERROR: Command failed (Result:1): C:\Windows\system32\cmd.exe /c "E:/Program Files/Emscripten/emscripten/1.16.0\tools\file_packager.py" J:\Game Projects\Active\Unreal Projects\MyProject3\Binaries\HTML5\MyProject3.data --preload . --pre-run --js-output=J:\Game Projects\Active\Unreal Projects\MyProject3\Binaries\HTML5\MyProject3.data.js. See logfile for details: 'cmd.txt' 

ProcessManager.KillAll: Trying to kill 0 spawned processes.

Program.Main: AutomationTool exiting with ExitCode=1

Domain_ProcessExit

ProcessManager.KillAll: Trying to kill 0 spawned processes.

AutomationToolLauncher exiting with ExitCode=1

copying UAT log files...

RunUAT.bat ERROR: AutomationTool was unable to run successfully.

BUILD FAILED

Ya, I found this about a week ago and put in a fix. It will be in the next release (4.3) and should already be mirrored in the live GitHub repository.

-Pete

Perfect, thanks Pete!