Fork me on GitHub
#babashka
<
2024-06-19
>
Vipin05:06:36

I am seeing different behaviour in babashka.process/shell with the {:continue true} option.

(:exit (babashka.process/shell  {:continue true} "ls foo"))  ;; 1 
(:exit (babashka.process/shell  {:continue true} "lss foo")) ;; throws java.io.IOException: error=2, No such file or directory
I can handle the exception but it would be nice if :continue can handle these two cases similarly.

borkdude09:06:24

I understand the issue but these paths are handled separately, continue is only affected by the exit code

borkdude09:06:14

the typical use case is that some binaries, e.g. a linter or whatever, may exit with 1, but you don't care. But if the linter isn't installed whatsoever, you may want to handle that scenario differently

lread11:06:32

@U04V15CAJ, I reviewed the babashka/process docs on this, and they are pretty good, but I guess they could be reworded slightly to be clearer. Also, I noticed :continue is described in README but not in any docstring. Would you like a small PR?

borkdude11:06:13

yes please!