clojure
function
babashka.deps/clojure
(clojure [& args])Starts clojure similar to CLI. Use `rlwrap bb` for `clj`-like invocation.
Invokes java with babashka.process/process for `-M`, `-X` and `-A`
and returns the associated record. Default options passed to
babashka.process/process are:
{:in :inherit
:out :inherit
:err :inherit
:shutdown p/destroy-tree}
which can be overriden with opts.
Returns `nil` and prints to *out* for --help, -Spath, -Sdescribe and
-Stree.
Examples:
(-> (clojure {:out :string} '-M '-e '(+ 1 2 3)]) deref :out) returns
"6
".
(-> @(clojure) :exit) starts a clojure REPL, waits for it
to finish and returns the exit code from the process.
Examples
No examples yet. Be the first to add one!