Closed errordeveloper closed 6 years ago
Ah, it's the old lack of xargs --no-run-if-empty
on MacOS, I think.
Perhaps a while read
loop will do for the inner loop instead, something like:
git grep -E -l "\b$image:" | while read f ; do sed -i.bak -e "s,$image:[[:xdigit:]]\{40\}\(-dirty\)\?,$tag,g" "$f" ; done
will do the job.
Or maybe drop the --no-run-if-empty
but add a /dev/null
to the end (so sed
always gets some input file).
Don't you think we need gsed also?
On Tue, 23 Jan 2018, 9:55 am Ian Campbell, notifications@github.com wrote:
Or maybe drop the --no-run-if-empty but add a /dev/null to the end (so sed always gets some input file).
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/linuxkit/kubernetes/issues/52#issuecomment-359738218, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPWS4bYFlzPVrh8BvQS4BHYiWTWt_Vwks5tNax8gaJpZM4RoWGB .
Don't you think we need gsed also?
There's not currently any reason suggested here why we would, but I could believe it would be blocked by the xargs issue since sed
is never actually executed while the problem is present so it might rear its head soon.
If the sed
expression is non-portable (not sure about the portability of [:xdigit:]
for example) then I would rather change it to be portable than require people to install gsed
(and to hack up our build to call it when appropriate).
Thanks, Ian!
On Tue, 30 Jan 2018, 11:41 am Ian Campbell, notifications@github.com wrote:
Closed #52 https://github.com/linuxkit/kubernetes/issues/52 via #55 https://github.com/linuxkit/kubernetes/pull/55.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/linuxkit/kubernetes/issues/52#event-1448356010, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPWS9rgLvCPYVa31gX85OpokqF7czqqks5tPv_ggaJpZM4RoWGB .
It fails on macOS: