Handle case where engine.json missing or corrupt (#7049)
Signed-off-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com>
This commit is contained in:
@@ -196,9 +196,7 @@ namespace O3DE::ProjectManager
|
||||
return true;
|
||||
}
|
||||
|
||||
bool forceRegistration = false;
|
||||
|
||||
// check if an engine with this name is already registered
|
||||
// check if an engine with this name is already registered and has a valid engine.json
|
||||
auto existingEngineResult = m_pythonBindings->GetEngineInfo(engineInfo.m_name);
|
||||
if (existingEngineResult)
|
||||
{
|
||||
@@ -230,10 +228,11 @@ namespace O3DE::ProjectManager
|
||||
// user elected not to change the name or force registration
|
||||
return false;
|
||||
}
|
||||
|
||||
forceRegistration = true;
|
||||
}
|
||||
|
||||
// always force register in case there is an engine registered in o3de_manifest.json, but
|
||||
// the engine.json is missing or corrupt in which case GetEngineInfo() fails
|
||||
constexpr bool forceRegistration = true;
|
||||
auto registerOutcome = m_pythonBindings->SetEngineInfo(engineInfo, forceRegistration);
|
||||
if (!registerOutcome)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user