Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions build_common.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,7 @@ class ModAssetsCookStep {
}
finally {
Write-Host "Cleaning up the asset cooking hacks"
$cleanupFailed = $false

# Revert ini
try {
Expand All @@ -1061,6 +1062,8 @@ class ModAssetsCookStep {
catch {
FailureMessage "Failed to revert $($this.sdkEngineIniPath)"
FailureMessage $_

$cleanupFailed = $true
}

# Revert junctions
Expand All @@ -1072,6 +1075,8 @@ class ModAssetsCookStep {
catch {
FailureMessage "Failed to remove $($this.cookerOutputPath) junction"
FailureMessage $_

$cleanupFailed = $true
}

if (![string]::IsNullOrEmpty($this.previousCookerOutputDirPath))
Expand All @@ -1087,8 +1092,16 @@ class ModAssetsCookStep {
catch {
FailureMessage "Failed to restore previous $($this.cookerOutputPath)"
FailureMessage $_

$cleanupFailed = $true
}
}

if ($cleanupFailed) {
Write-Host ""
Write-Host ""
ThrowFailure "Failed to clean up the asset cooking hacks - your SDK is now in a corrupted state. Please preform the cleanup manually before building a mod or opening the editor."
Comment thread
robojumper marked this conversation as resolved.
}
}
}

Expand Down