This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-07
Channels
- # babashka (30)
- # beginners (49)
- # calva (22)
- # cider (9)
- # clara (2)
- # clj-commons (1)
- # cljdoc (1)
- # clojars (7)
- # clojure (153)
- # clojure-australia (2)
- # clojure-europe (45)
- # clojure-italy (3)
- # clojure-losangeles (1)
- # clojure-nl (17)
- # clojure-portugal (3)
- # clojure-uk (6)
- # clojurescript (21)
- # conjure (4)
- # copenhagen-clojurians (5)
- # cryogen (3)
- # cursive (19)
- # datahike (14)
- # datascript (4)
- # datomic (9)
- # events (5)
- # fulcro (23)
- # graalvm (1)
- # gratitude (4)
- # helix (2)
- # holy-lambda (5)
- # improve-getting-started (2)
- # jobs (10)
- # kaocha (1)
- # leiningen (1)
- # liquid (8)
- # membrane (81)
- # off-topic (88)
- # polylith (29)
- # quil (1)
- # reitit (2)
- # remote-jobs (8)
- # reveal (8)
- # sci (1)
- # shadow-cljs (14)
- # specter (4)
- # sql (5)
- # tools-build (11)
- # tools-deps (5)
Not yet I think but it’s pretty easy to add this. Start adding doc keys to your vars and make an issue at the pods repo. Your also welcome to add this support but I’d be happy to do it
and then we need to update this bit of code: https://github.com/babashka/pods/blob/de4c3610c9ef3879370d01b7202a9f3a9d056f6e/src/babashka/pods/impl.clj#L116 and several other places where this is used
How can I script in bb to wait for one command to finish before starting the next one? I am issuing two aws cli commands and it appears that the first one triggers smth asynchronously and quits, and the next one starts before the actual change has been made.
processes are deref
able, so you’d just @(p/process ["aws" "some-command"])
or you can use (p/check)
which will throw if the process returns a bad exit-code
correct! and you can also use (babashka.tasks/shell "aws some-command")
which will do all of the above - it accepts similar options to bb process but as the first argument
The main being that if a shell command fails (eg error or not known) I only get the exception and the error is printed in the Calva output which I never use. The second reason is that parsing the output is rather cumbersome compared to java sh
@U96LS78UV there is also babashka.process/sh
which is similar to clojure.java.shell/sh
but tokenizes the arguments for you
Thanks for the tip with continue! This works ok
((juxt :out :err) (shell {:continue true :out :string :err :string} "aws some-command" ))
yes. babashka.process/sh
is like clojure.java.shell/sh
(but it also tokenizes the string for you)