fix: avoid too long diffs in cli

This commit is contained in:
Ruben Fiszel
2024-01-18 00:35:31 +01:00
parent e6aa71dacf
commit be97de96b6
+4
View File
@@ -64,6 +64,10 @@ export function isSuperset(
export function showDiff(local: string, remote: string) {
let finalString = "";
if (local?.length > 20000 || remote?.length > 20000) {
log.info("Diff too large to display");
return;
}
for (const part of Diff.diffLines(local, remote)) {
if (part.removed) {
// print red if removed without newline