Remote Mac build failing on staging step.

Hi, I’d love to get some help on why my build is failing. My company has its own version of UE5 with a folder we call CoreSDK that is in the same directory level as Engine and the Project level. I’m building the iOS platform on Windows with a remote Mac machine by running this script:

pushd %~dp0\..\..\..
set rootdir=%cd%
 
@rem default arguments
@set config=Development
@set exclusionlist=-ExcludeCategoryFile="..\..\..\Automation\ExcludeCategoryFile.ini"
 
call Engine/Build/BatchFiles/RunUAT BuildCookRun -project=%rootdir%\Projects\SampleProject\SampleProject.uproject -noP4 -client -platform=IOS -clientconfig=%config% -build -cook -pak -package -stage -iterate -utf8output -addcmdline=%runcmdline% %exclusionlist% %*
 
popd

The build fails in the Stage step with the following error:

ERROR: System.IO.DirectoryNotFoundException: Could not find a part of the path 'T:\Users\***\UE5\Builds\MCHIN1WD1\T\p4\<redacted>\dev-ps\CoreSDK\Plugins\Runtime\CoreSDKUtils\CoreSDKUtils.uplugin'.
          at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
          at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
          at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
          at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
          at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks)
          at System.IO.File.InternalReadAllText(String path, Encoding encoding)
          at System.IO.File.ReadAllText(String path)
          at EpicGames.Core.FileReference.ReadAllText(FileReference Location) in T:\p4\<redacted>\dev-ps\Engine\Source\Programs\Shared\EpicGames.Core\FileReference.cs:line 442
          at EpicGames.Core.JsonObject.Read(FileReference File) in T:\p4\<redacted>\dev-ps\Engine\Source\Programs\Shared\EpicGames.Core\JsonObject.cs:line 93
          at UnrealBuildTool.PluginDescriptor.FromFile(FileReference FileName) in T:\p4\<redacted>\dev-ps\Engine\Source\Programs\UnrealBuildTool\System\PluginDescriptor.cs:line 331
          at AutomationScripts.Project.StageLocalizationDataForPlugin(DeploymentContext SC, List`1 CulturesToStage, FileReference Plugin) in T:\p4\<redacted>\dev-ps\Engine\Source\Programs\AutomationTool\Scripts\CopyBuildToStagingDirectory.Automation.cs:line 414
          at AutomationScripts.Project.CreateStagingManifest(ProjectParams Params, DeploymentContext SC) in T:\p4\<redacted>\dev-ps\Engine\Source\Programs\AutomationTool\Scripts\CopyBuildToStagingDirectory.Automation.cs:line 974
          at AutomationScripts.Project.CopyBuildToStagingDirectory(ProjectParams Params) in T:\p4\<redacted>\dev-ps\Engine\Source\Programs\AutomationTool\Scripts\CopyBuildToStagingDirectory.Automation.cs:line 4577
          at BuildCookRun.DoBuildCookRun(ProjectParams Params) in T:\p4\<redacted>\dev-ps\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 207
          at BuildCookRun.ExecuteBuild() in T:\p4\<redacted>\dev-ps\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 41
          at AutomationTool.BuildCommand.Execute() in T:\p4\<redacted>\dev-ps\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 344
          at AutomationTool.Automation.Execute(List`1 CommandsToExecute, Dictionary`2 Commands) in T:\p4\<redacted>\dev-ps\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 254
          at AutomationTool.Automation.Process(ParsedCommandLine AutomationToolCommandLine, StartupTraceListener StartupListener, HashSet`1 ScriptModuleAssemblies) in T:\p4\<redacted>\dev-ps\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 153
       (see T:\p4\<redacted>\dev-ps\Engine\Programs\AutomationTool\Saved\Logs\Log.txt for full exception trace)

It looks to me like the absolute path on the remote Mac is being appended to the absolute path on my Windows machine for this specific plugin which is defined in CoreSDK.

Has anyone run into this error/has anyone been able to fix this issue?