You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, a "normal assumption" would probably be that "This is all a golang script, so the execution shouldn't be affected by local environment variances." So without this requirement documented clearly then we can encounter unexpected behavior explained by "well it works on my machine".
This was all learned in a first hand experience based on PRs I was working on last friday. We were seeing that even if I made no changes at all and ran make charts then it would results in file modifications. Eventually it was all tracked down to the fact that on macOS they ship with a BSD based "Apple" version of diff and patch. See:
→ patch --version
patch 2.0-12u11-Apple
→ diff --version
Apple diff (based on FreeBSD diff)
After using brew to install gpatch and diffutils packages I have GNU versions and get expected results:
The functionality of generating and applying the diff patches are dependent on local system
diff
andpatch
binaries.Per these lines:
charts-build-scripts/pkg/diff/diff.go
Line 19 in a7001e3
charts-build-scripts/pkg/diff/diff.go
Line 57 in a7001e3
Unfortunately, a "normal assumption" would probably be that "This is all a golang script, so the execution shouldn't be affected by local environment variances." So without this requirement documented clearly then we can encounter unexpected behavior explained by "well it works on my machine".
This was all learned in a first hand experience based on PRs I was working on last friday. We were seeing that even if I made no changes at all and ran
make charts
then it would results in file modifications. Eventually it was all tracked down to the fact that on macOS they ship with a BSD based "Apple" version ofdiff
andpatch
. See:After using brew to install
gpatch
anddiffutils
packages I have GNU versions and get expected results:The text was updated successfully, but these errors were encountered: