This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-27
Channels
Hi! We talked about this before, but I don't remember what the resolution was. Should babashka.process/shell respect *defaults*
?
user=> (binding [babashka.process/*defaults* (assoc-in babashka.process/*defaults* [:env "ENVVAR"] "a")] (:out @(babashka.process/process {:out :string} "bash" "-c" "echo $ENVVAR")))
"a\n"
user=> (binding [babashka.process/*defaults* (assoc-in babashka.process/*defaults* [:env "ENVVAR"] "a")] (:out @(babashka.process/shell {:out :string} "bash" "-c" "echo $ENVVAR")))
"\n"
I was expecting the same result
bb v1.3.179Cool cool cool!
This would be useful for $SECRET_BB_PROJECT
I'm installing a pod in a docker image: RUN /usr/home/codecan/bin/bb "(babashka.pods/load-pod 'tzzh/mail \"0.0.2\")"
and it's ending up in /root/.babashka/...
do I have any level of control over where the .babashka
folder is created automatically?
Yes there is an env var for this, I think it’s in the README of the pods project, I can look it up later for you if I’m back at the kbd
In https://github.com/babashka/pods/blob/master/README.md couldn't find anything to setup up the path that load-pods is using do download pods
It's this one: https://github.com/search?q=repo%3Ababashka%2Fpods%20BABASHKA_PODS_DIR&type=code
Is Babashka limited in which libraries it supports? I’m getting a Unable to resolve classname: com.moandjiezana.toml.Toml
while trying to use a TOML parser library https://github.com/ilevd/toml
with bb.edn: {:deps {toml/toml {:mvn/version "0.1.4"}}}
and my toml
library usage of :
(require '[toml.core :as toml])
(defn get-pyproject-toml-version []
(toml/read (slurp "pyproject.toml")))
Perhaps it's possible to make a babashka pod around toml https://github.com/babashka/pod-registry
You might also be able to use the BNF grammar (https://github.com/toml-lang/toml/pull/236) and instaparse-bb