Skip to content

Commit

Permalink
throw warning for duplicate systems
Browse files Browse the repository at this point in the history
  • Loading branch information
vmaark committed Feb 27, 2024
1 parent d5c0682 commit 4304adb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/cli/src/deploy/resolveConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ export function resolveConfig<config extends ConfigInput>({
};
});

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 }) => {
Expand Down

0 comments on commit 4304adb

Please sign in to comment.