This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-17
Channels
- # beginners (52)
- # boot (116)
- # cider (21)
- # cljs-dev (44)
- # clojure (104)
- # clojure-dev (82)
- # clojure-greece (5)
- # clojure-japan (4)
- # clojure-nl (14)
- # clojure-russia (65)
- # clojure-serbia (3)
- # clojure-spec (38)
- # clojure-uk (9)
- # clojure-ukraine (1)
- # clojurescript (65)
- # clojurewest (1)
- # community-development (1)
- # core-logic (3)
- # cursive (5)
- # data-science (9)
- # datomic (13)
- # emacs (45)
- # euroclojure (1)
- # hoplon (2)
- # instaparse (23)
- # javascript (1)
- # jobs (2)
- # klipse (43)
- # leiningen (8)
- # lumo (25)
- # off-topic (7)
- # om (13)
- # om-next (3)
- # onyx (11)
- # pedestal (12)
- # planck (19)
- # proton (1)
- # re-frame (26)
- # reagent (26)
- # remote-jobs (13)
- # ring-swagger (23)
- # spacemacs (1)
- # untangled (3)
(planck.shell/with-sh-dir "." (:out (planck.shell/sh "pwd")))
works but (planck.shell/with-sh-dir "." (:out (planck.shell/sh "git log")))
gives me "launch path not accessible"
Hmm, not really about planck, but I figure there's people in this channel who could know the answer
I'm wondering why (sh/sh "ag" "a")
doesn't work. The command runs, but exits with 1 and doesn't find anything. (sh/sh "pwd")
tells me I'm in the right directory, and the ag command works fine from the command line
Cool… glad you figured it out @kauko . The planck.shell
namespace is meant to mimic clojure.java.shell
, so you can both use examples in the wild about using the Clojure namespace, and potential bugs in Planck (if it isn’t of high fidelity in corner cases).
Arg. This exact question came up before and was solved… need to find the web archive of this channel 🙂
We need Planck to support https://github.com/mfikes/planck/issues/54
It's a shame it works so poorly, I'd love to replace some more complicated bash scripts with clojure
@kauko Well, I believe the concept of pipes are implemented by shells (as in Bash). So, neither Planck nor clojure.java.shell
can directly do anything about pipes. All they can do is launch processes. But… clojure.java.shell
has a facility where you can obtain a stream for stdout and stderr (instead of strings), and with such streams you could theoretically compose them in Clojure to produce pipes. Planck doesn’t yet support the notion of returning a stream, but it probably could fairly easily.