process icon indicating copy to clipboard operation
process copied to clipboard

Piping to file in last process of pipeline doesn't work

Open borkdude opened this issue 4 years ago • 1 comments

(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")
(with-open [w (io/writer "hello.txt")]
  (->> (p/pipeline
       (p/pb '[echo foo])
       (p/pb '[cat "bb.edn"] {:out w}))
       (run! p/check)))

(slurp "hello.txt")

borkdude avatar Aug 27 '21 15:08 borkdude

Possibly related to #44 as well.

borkdude avatar Aug 27 '21 15:08 borkdude