Skip to content

Commit

Permalink
concurrently
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Oct 19, 2024
1 parent 826a658 commit 60e9fcf
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/babashka/process.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -732,13 +732,16 @@
proc-fn (fn [command]
(let [id (swap! counter inc)]
(prn "command" command)
(apply process
{:in :inherit
:out-line-fn (fn [line]
(println (format "[%s]" id) line))
:err-line-fn (fn [line]
(println (format "[%s]" id) line))}
command)))
(let [command (if (string? command)
[command]
command)]
(apply process
{:in :inherit
:out-line-fn (fn [line]
(println (format "[%s]" id) line))
:err-line-fn (fn [line]
(println (format "[%s]" id) line))}
command))))
procs (map proc-fn commands)]
(doseq [p procs]
(check p)))))

0 comments on commit 60e9fcf

Please sign in to comment.