process
process copied to clipboard
`check` fails when `process`' `:err` opt is a clj stream
check fails with the following error when passed the *err* stream:
Execution error (IllegalArgumentException) at babashka.process/check (process.cljc:106).
Cannot open <#object[java.io.PrintWriter 0x784abd3e "java.io.PrintWriter@784abd3e"]> as an InputStream.
To reproduce on the REPL:
;; Clojure 1.11.1
user=> (require '[babashka.process :as p])
;; => nil
user=> (-> (p/process '[ls ----] {:err *err*}) p/check)
ls: unknown option -- --
Try '/usr/bin/ls --help' for more information.
;; => Execution error (IllegalArgumentException) at babashka.process/check (process.cljc:106).
;; => Cannot open <#object[java.io.PrintWriter 0x784abd3e "java.io.PrintWriter@784abd3e"]> as an InputStream.
PR to follow.