diff --git a/packages/cli/src/deploy/resolveConfig.ts b/packages/cli/src/deploy/resolveConfig.ts index 034af8bf41..6c4d3d7039 100644 --- a/packages/cli/src/deploy/resolveConfig.ts +++ b/packages/cli/src/deploy/resolveConfig.ts @@ -79,6 +79,12 @@ export function resolveConfig({ }; }); + systems.forEach((item, index) => { + if (systems.some((elem, idx) => elem.systemId === item.systemId && idx !== index)) { + throw new Error(`Duplicate system ID ${item.systemId} found in the config.`); + } + }); + // resolve allowedSystemIds // TODO: resolve this at deploy time so we can allow for arbitrary system IDs registered in the world as the source-of-truth rather than config const systemsWithAccess = systems.map(({ allowedAddresses, allowedSystemIds, ...system }) => {