diff --git a/packages/rnv/src/core/engineManager/index.js b/packages/rnv/src/core/engineManager/index.js index 4554f8114b..0365a6fd85 100644 --- a/packages/rnv/src/core/engineManager/index.js +++ b/packages/rnv/src/core/engineManager/index.js @@ -133,7 +133,7 @@ export const registerAllPlatformEngines = async (c) => { if (registerEngineList.length) { await Promise.all(registerEngineList); } - + c.runtime.hasAllEnginesRegistered = true; return true; }; diff --git a/packages/rnv/src/core/taskManager/index.js b/packages/rnv/src/core/taskManager/index.js index 33023de6d9..0bd07f3a18 100644 --- a/packages/rnv/src/core/taskManager/index.js +++ b/packages/rnv/src/core/taskManager/index.js @@ -191,7 +191,7 @@ export const findSuitableTask = async (c, specificTask) => { // Custom tasks are executed by core engine logInfo(`Running custom task ${task}`); } else if (!suitableEngines.length) { - if (!c.platform || c.platform === true) { + if ((!c.platform || c.platform === true) && !c.runtime.hasAllEnginesRegistered) { // No platform was specified. we have no option other than load all engines and offer platform list next round await registerAllPlatformEngines(c); return findSuitableTask(c);