fix(diff): use arg '--strip-trailing-cr' (#949)

In tests with diff, ignores trailing carriage returns (so tests pass on windows)
This commit is contained in:
Unai Martinez-Corral 2021-11-16 22:17:12 +00:00 committed by GitHub
parent 442031e4ff
commit 62a72cdd0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,7 +43,7 @@ func compareFiles(pathA, pathB string) error {
// Don't execute diff if it can't be found.
return nil
}
diffCmd := exec.Command(diffPath, "-u", pathA, pathB)
diffCmd := exec.Command(diffPath, "-u", "--strip-trailing-cr", pathA, pathB)
diffCmd.Stdout = output
diffCmd.Stderr = output