diff --git a/devTools/scripts/detectChanges.js b/devTools/scripts/detectChanges.js
index 58d660e6247a2ac2b755d274d8b066681f6e3e6f..ec72609014cb8383632077b42dcc6907386289a4 100644
--- a/devTools/scripts/detectChanges.js
+++ b/devTools/scripts/detectChanges.js
@@ -168,23 +168,27 @@ class ChangeParser {
 			} else {
 				const command = `git diff -U${this.countFileLines(file)} ${this.mergeCommit} -- ${file}`;
 				/** @type {Array<string>} */
-				let result = execSync(command).toString().trim().split('\n');
-
-				// remove first two lines
-				result = result.slice(2);
-				// remove all lines starting with ---, +++, or @@
-				result = result.filter(line => !line.startsWith("---") && !line.startsWith("+++") && !line.startsWith("@@"));
-				// remove all lines starting with -
-				result = result.filter(line => !line.startsWith("-"));
-				let lineNo = 0;
-				// for each line
-				result.forEach(line => {
-					lineNo += 1;
-					// if line starts with + add line number to changed lines
-					if (line.startsWith("+")) {
-						changed[file].push(lineNo);
-					}
-				});
+				try {
+					let result = execSync(command).toString().trim().split('\n');
+
+					// remove first two lines
+					result = result.slice(2);
+					// remove all lines starting with ---, +++, or @@
+					result = result.filter(line => !line.startsWith("---") && !line.startsWith("+++") && !line.startsWith("@@"));
+					// remove all lines starting with -
+					result = result.filter(line => !line.startsWith("-"));
+					let lineNo = 0;
+					// for each line
+					result.forEach(line => {
+						lineNo += 1;
+						// if line starts with + add line number to changed lines
+						if (line.startsWith("+")) {
+							changed[file].push(lineNo);
+						}
+					});
+				} catch {
+					// git fails with a `Circular *1` error sometimes on merge commits
+				}
 			}
 		}