This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-03
Channels
- # aleph (8)
- # announcements (3)
- # architecture (47)
- # babashka (22)
- # beginners (22)
- # chlorine-clover (2)
- # cider (15)
- # clj-yaml (6)
- # cljs-dev (3)
- # clojure (76)
- # clojure-austin (2)
- # clojure-europe (16)
- # clojure-france (10)
- # clojure-gamedev (11)
- # clojure-norway (28)
- # clojure-sweden (4)
- # clojurescript (32)
- # conjure (1)
- # datahike (2)
- # datomic (6)
- # events (9)
- # graalvm (8)
- # gratitude (5)
- # honeysql (8)
- # humbleui (2)
- # hyperfiddle (37)
- # jobs (1)
- # polylith (4)
- # re-frame (14)
- # releases (2)
- # rum (9)
- # sci (9)
- # scittle (8)
- # shadow-cljs (9)
- # spacemacs (4)
- # sql (10)
- # xtdb (24)
Hi! I’m running babashka on the CI and trying to shell out to the aws
CLI tool for something and getting a Message: Cannot run program "aws": error=2, No such file or directory
, but earlier in my script I do call the aws
tool directly, which suggest babashka doesn’t have access to the same path or something? What’s the best way to figure out what’s going on?
first one outputs nothing and second one {:proc #object[java.lang.ProcessImpl 0x32381f4b "Process[pid=557, exitValue=1]"], :exit 1, :in #object[java.lang.ProcessImpl$ProcessPipeOutputStream 0x3957dc8c "java.lang.ProcessImpl$ProcessPipeOutputStream@3957dc8c"], :out "", :err "", :prev nil, :cmd ["which" "aws"]}
(I’ve just clocked the output of the “previous use of aws” gets sent to a file, so it’s probably failing and writing that to a file which is why I don’t see the original failure)
OK I was wrong about that - I’ve found out the aws tool is installed on the container using pip, so aws
is actually a script not a binary 🤯
Maybe you can find something here. I simply googled for "pip aws path" https://stackoverflow.com/questions/23332147/awscli-not-added-to-path-after-installation
thank you I’ve fixed my issue now (installed it differently) - and I now know to start with which X
to debug any such issues in the future 😄
How do I get (process)
to print to the REPL and not the terminal? It seems like this gets it working for the terminal
(process {:in :inherit
:out :inherit
:err :inherit} "npx tailwindcss...")
But I thought *out
would work to get it to the REPL
(process {:in :inherit
:out *out*
:err *out*} "npx tailwindcss...")
But there's no output with thisprinting to *out*
is buffered, this is why you don't see output in real time. perhaps this trick works:
https://twitter.com/borkdude/status/1628786679447269377/photo/1
There is some stuff around this in this discussion too:
https://github.com/babashka/process/discussions/102
Does the REPL not automatically read buffered output? Or does println automatically read through *out*
Thanks for the threads!
What do you mean by "print to the REPL"? And is npx doing fancy stuff? If I do
(process {:out *out*} "ls")
I get output as though I had used println
@U013JFLRFS8 your example works because the ls output is closed and then it's printed. closing forces a flush