I am trying to write an install script in babaska for my other babaska script (for some fun homogeneity).
Export doesn't seem to work using:
(shell "export NAME=" value)
Is there a canonical way to set environmental variables in Clojure / Babashka?
exportis shell built-in; you can not call it outside a shell. So what you want to do instead is run your command with another environment. This can be done inshwith the:envoption. E.g.edit: global state for environment
At least on the JVM, there is no easy way to change the environment. So you are better off, writing your own function to do the calls and merge with your own global environment.
This example uses an atom to keep the environment around: