Fork me on GitHub
#tools-build
<
2022-02-11
>
lread19:02:20

Am I right in that https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-git-process doesn’t support failing on non-zero git exit codes? Or have I not had enough coffee yet?

seancorfield19:02:42

The underlying process function doesn't "fail", it just returns status/output stuff.

lread19:02:47

Yeah, that’s all fine. It just surprised me a bit that I could not even check the git exit code. Easy enough to do my own thing tho.

Alex Miller (Clojure team)19:02:44

What problem are you trying to solve?

lread19:02:45

Failing my build if a git command fails for whatever reason.

lread19:02:39

(including stupid human errors)

seancorfield19:02:27

You could use the raw process function and throw on :exit being non-zero.

lread19:02:45

Yeah thanks, am doing my own thing now. Just thought maybe git-process could use tweak. But am totally fine with not using it too.

lread20:02:45

(in other words, was trying to be helpful in confirming/highlighting a potential issue, aim was not to be complainy 😇).

Alex Miller (Clojure team)20:02:04

yep, thanks! maybe we could throw on non-0 exit