mirror of
https://github.com/spf13/cobra.git
synced 2024-11-15 09:48:19 -07:00
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:
parent
442031e4ff
commit
62a72cdd0f
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user