Fork me on GitHub
#babashka
<
2022-02-19
>
Benjamin11:02:51

is the output of the current-task available during "leave" ? Use case is it would help me to print out all task results

borkdude11:02:12

@benjamin.schwerdtner Currently not. We could add that. You could wrap your tasks in a function which does so.

Benjamin12:02:42

I was just checking tasks.clj and isn't the name of the task then bound to the output?

(println
 (wrap-enter-leave
  'a
  10
  nil
  '(prn a)))

=> 

(let [a 10]
  (prn a)
  a)

borkdude12:02:19

yes, but you can't really access it

borkdude12:02:53

we could just add a :result key to the current-task map

Benjamin12:02:25

would sound useful to me ^^

borkdude12:02:51

issue and/or PR welcome