process icon indicating copy to clipboard operation
process copied to clipboard

Clojure library for shelling out / spawning sub-processes

Results 9 process issues
Sort by recently updated
recently updated
newest added

E.g.: ``` (process ["foo" "bar"] {:color :green :prepend "FOO"}) ``` This would be useful in babashka tasks where multiple processes are running in parallel so you can distinguish them.

The use case for tee is to redirect output to stdout but also to capture it in a file. We could make a built-in construct for this so you can...

``` clojure (require '[babashka.process :as p] '[clojure.java.io :as io]) (with-open [w (io/writer "hello.txt")] (-> (p/pipeline (p/pb '[echo foo]) (p/pb '[cat "bb.edn"])) last (p/process '[cat] {:out w}) p/check)) (slurp "hello.txt") ```...

It would be nice if we could download binary files like so: ``` (def response (-> (process ["curl" "--progress-bar" "http://ipv4.download.thinkbroadband.com/200MB.zip"] {:out bytes :err :inherit}) deref :out)) ``` and the response...

PR welcome

The reason for this is that adding a shutdown hook by default creates a potential memory leak problem: the closure will be retained until shutdown. In case of lots of...

This is a deadlock: ``` (-> (process ["cat"] {#_#_:out (io/file "/tmp/foo.csv") :in (io/file "/Users/borkdude/Downloads/1mb-test_csv.csv")}) check) ``` since the stream can't write anywhere, it's waiting before it can exit. This works:...

`check` fails with the following error when passed the `*err*` stream: ``` Execution error (IllegalArgumentException) at babashka.process/check (process.cljc:106). Cannot open as an InputStream. ``` To reproduce on the REPL: ```...

I have run into an apparent hang when using `pb` in babashka on Linux. I can't determine if I am using the interface wrong or if this is a bug....

Hi, it is considered a useful aid in shell scripting to echo the commands being executed. This is a request to include such an `:echo true` option in `shell` or/and...