Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

In tests with diff, ignores trailing carriage returns (so tests pass on windows)

authored by Unai Martinez-Corral · committed by GitHub · parent 442031e · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:cobra/cmd/golden_test.go+1 added-1 removed
41 unmodified lines
42 if err != nil {43 // Don't execute diff if it can't be found.44 return nil45 }46 diffCmd := exec.Command(diffPath, "-u", pathA, pathB)46 diffCmd := exec.Command(diffPath, "-u", "--strip-trailing-cr", pathA, pathB)47 diffCmd.Stdout = output48 diffCmd.Stderr = output4950 output.WriteString("$ diff -u " + pathA + " " + pathB + "\n")
7 unmodified lines