Debugging a makefile, as one does..
turns out...
zip(1) exits with code 12 if it "has nothing to do"
mother fucker we have a code for that already it's called zero. There's *got* to be a history here and I wanna know it.
@whack bazel has some formatting tools which exit with code 3 when this occurs and google is a terrible company as usual
@whack fwiw i'm kind of sympathetic to this idea in general but it should not be the default and there should be a flag to enable more informative error codes to avoid breaking builds based on reasonable assumptions
@whack also at that point just do json output that's actually what i'm doing for the rust zip crate cli https://github.com/zip-rs/zip2/pull/235
@hipsterelectron +1 to structured output. I don’t love trying to compress all possible communications into a small integer
@whack i have a whole thesis on this topic but i just woke up
@hipsterelectron was it possibly about how we went from integer error types in C to mostly-strings error types in Go and seemingly learned nothing in the past 50 years
@whack oh it was about how to eventually work towards a framework for structured output for shell commands without going the powershell/nushell approach and simply rewriting all the commands yourself where the structure only works if you use the enclosed shell ecosystem. standardized schemas for json input/output corresponding to the cli are both normal to want and possible to achieve
@whack stringly-typed errors are lol
@whack you could argue that string errors are a step down from numerics as those are at least introspectable according to a defined schema
@whack that's a bit of a made-up argument to be clear
@whack http 200, check json payload for errors
lol
@whack I mean, I can instantly construct the scenario that leads to this … and I can also think three seconds further to scream, “Why, God, Why?!??”
@rozenglass Always weird finding surprising software behavior; I check the exit code and move on - `x=$?; [ "$x" -eq 0 -o "$x" -eq 12 ] || exit $x` -