hi, I have a basic question on Planck: when executing a shell command, how can you return from the script into your shell with :err going to stderr, :out going to stdout?
@stijn ClojureScript defines *print-err-fn*
and Planck sets this up to go to stderr. So, with foo.cljs
(*print-err-fn* "stderr")
(*print-fn* “stdout”)
and then
planck foo.cljs 2> /tmp/stderr.txt
you will see that stdout
is printed on your terminal while the stderr
is redirected to the file.
With this you could do something along the lines of (*print-err-fn* (:err sh-result))
and similarly with stdout, and then (planck.core/exit 0)
thanks @mfikes!