diff --git a/cobra/cmd/golden_test.go b/cobra/cmd/golden_test.go index 9010caa13a..c030c6ab5e 100644 --- a/cobra/cmd/golden_test.go +++ b/cobra/cmd/golden_test.go @@ -44,7 +44,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