Use Invoke-Expression to call nested ue-build, more reliable

This commit is contained in:
Steve Streeting 2023-09-29 20:56:33 +01:00
parent 44ff8bd318
commit bca0c1bf18

View File

@ -233,7 +233,12 @@ try {
# to run the "Cook" stage. If we don't do this, then any source plugins will # to run the "Cook" stage. If we don't do this, then any source plugins will
# be missing in a clean checkout build and the cook stage will fail # be missing in a clean checkout build and the cook stage will fail
Write-Output "Building Editor (for Cooking)" Write-Output "Building Editor (for Cooking)"
.\ue-build.ps1 -mode:dev -src:$src -nocloseeditor -dryrun:$dryrun $cmdargs = @()
$cmdargs += "-src:$src"
if ($dryrun) {
$cmdargs += "-dryrun"
}
Invoke-Expression "&'$PSScriptRoot/ue-build.ps1' -mode:dev $cmdargs"
$ueEditorCmd = Get-UEEditorCmd $ueVersion $ueinstall $ueEditorCmd = Get-UEEditorCmd $ueVersion $ueinstall
$runUAT = Join-Path $ueinstall "Engine/Build/BatchFiles/RunUAT$batchSuffix" $runUAT = Join-Path $ueinstall "Engine/Build/BatchFiles/RunUAT$batchSuffix"