This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-08
Channels
- # announcements (40)
- # babashka (14)
- # babashka-sci-dev (7)
- # beginners (50)
- # calva (8)
- # cider (25)
- # clj-kondo (7)
- # cljdoc (8)
- # cljs-dev (14)
- # clojars (6)
- # clojure (56)
- # clojure-australia (1)
- # clojure-berlin (2)
- # clojure-dev (16)
- # clojure-europe (18)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-uk (7)
- # clojurescript (100)
- # cursive (57)
- # data-science (9)
- # datomic (6)
- # emacs (11)
- # figwheel (2)
- # fulcro (14)
- # helix (2)
- # hyperfiddle (9)
- # introduce-yourself (1)
- # lsp (20)
- # malli (14)
- # meander (34)
- # minecraft (1)
- # missionary (8)
- # off-topic (37)
- # pedestal (4)
- # polylith (18)
- # portal (3)
- # re-frame (5)
- # ring (33)
- # shadow-cljs (32)
- # spacemacs (6)
- # vim (16)
I might be missing the obvious here but how can I set an environment variable from within a babashka REPL? I want to test a function that reads an environment variable (side-effects, yikes, I know, but I can't change it for now) with different values of that variable without starting the REPL every time (or running the namespace as a script)
It doesn't seem to be easy. You can easily read env with System/getenv
but setting the env seems https://stackoverflow.com/questions/318239/how-do-i-set-environment-variables-from-java
you cannot change your own environment from within a script if thats what you want. its a limitation of the JVM and you need to have some native code
yeah that might be easiest.
TIL, thank you guys. Spawning a new bb process should work, I'd never think of it on my own. 🙂
Where does shell
come from, which I can access in my bb.edn tasks without any require. When I open bb.edn and connect to the nrepl that instance can't find it
perfect thank you.
is there some quick and dirty way to eat the exception it raises if its process exits with an error code?
can do continue true: https://github.com/bob-cd/bob/blob/main/apiserver/bb.edn#L14
perfect! thank you!