Skip to content

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

@borkdude

Description

@borkdude
(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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions