diff --git a/packages/@aws-cdk/cfnspec/build-tools/spec-diff.ts b/packages/@aws-cdk/cfnspec/build-tools/spec-diff.ts index 86fb8a6145f21..465637b789522 100644 --- a/packages/@aws-cdk/cfnspec/build-tools/spec-diff.ts +++ b/packages/@aws-cdk/cfnspec/build-tools/spec-diff.ts @@ -237,6 +237,10 @@ async function main() { if (Array.isArray(update)) { changes.push(`* ${namespace} ${prefix} (__changed__)`); for (const entry of update) { + if (entry.length === 1 && entry[0] === ' ') { + // This means that this element of the array is unchanged + continue; + } if (entry.length !== 2) { throw new Error(`Unexpected array diff entry: ${JSON.stringify(entry)}`); } @@ -247,7 +251,7 @@ async function main() { case '-': throw new Error(`Something awkward happened: ${entry[1]} was deleted from ${namespace} ${prefix}!`); case ' ': - // This entry is "context" + // This entry is "context" break; default: throw new Error(`Unexpected array diff entry: ${JSON.stringify(entry)}`);