This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-12
Channels
- # announcements (3)
- # babashka (6)
- # beginners (84)
- # biff (1)
- # cider (7)
- # cljsrn (1)
- # clojure (18)
- # clojure-australia (3)
- # clojure-dev (21)
- # clojure-france (1)
- # clojure-spec (6)
- # clojurescript (78)
- # datomic (34)
- # emacs (5)
- # exercism (32)
- # graalvm (1)
- # helix (2)
- # hyperfiddle (3)
- # lsp (36)
- # malli (4)
- # missionary (3)
- # off-topic (54)
- # re-frame (14)
- # releases (2)
- # sql (31)
- # vim (9)
In tasks, is there a way to pass environment variables to the shell
function as with clojure.java.shell/sh
?
With clojure.java.shell/sh
you can do:
(require '[clojure.java.shell :refer [sh]])
(sh "printenv" :env {:hello "world"})
which returns:
hello=world
How can I set an environment variable within a task so that it's available during that task. I could use sh
for this, but sh
will not show anything while the task is running. shell
does "stream" the output as it runs.Made a hello world Docker Action using babashka: https://github.com/borkdude/babashka-docker-action-example
