Merge pull request #41506 from weswigham/fix-post-LK-build

Fix post-LKG build
This commit is contained in:
Wesley Wigham
2020-11-11 17:14:01 -08:00
committed by GitHub

View File

@@ -1381,7 +1381,7 @@ namespace Harness {
else {
IO.writeFile(actualFileName, encodedActual);
}
if (require && opts && opts.PrintDiff) {
if (!!require && opts && opts.PrintDiff) {
const Diff = require("diff");
const patch = Diff.createTwoFilesPatch("Expected", "Actual", expected, actual, "The current baseline", "The new version");
throw new Error(`The baseline file ${relativeFileName} has changed.${ts.ForegroundColorEscapeSequences.Grey}\n\n${patch}`);